fix: SSR 데이터 주입 방식 수정 - layout에서 ssrData script 태그 직접 출력
- app.js: initScript() 헬퍼로 <script>var __INIT__=데이터</script> 생성 - layout.ejs: <%- ssrData %> 로 body 뒤에 script 태그 삽입 - 모든 페이지에서 첫 로드 시 즉시 데이터 표시 확인 완료 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -119,7 +119,7 @@ tr:hover td{background:rgba(255,255,255,.02)}
|
||||
</div>
|
||||
</div>
|
||||
<div class="toast" id="toast"></div>
|
||||
<script>var __INIT__ = <%- typeof initialData !== 'undefined' ? initialData : '{}' %>;</script>
|
||||
<%- typeof ssrData !== 'undefined' ? ssrData : '' %>
|
||||
<script>
|
||||
function api(method, url, data) {
|
||||
const opts = { method, headers: { 'Content-Type': 'application/json' }, credentials: 'same-origin' };
|
||||
|
||||
Reference in New Issue
Block a user