@mandujs/mcp 0.9.19 → 0.9.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/tools/hydration.ts +8 -8
package/package.json
CHANGED
package/src/tools/hydration.ts
CHANGED
|
@@ -378,19 +378,19 @@ function generateClientSlotTemplate(routeId: string, slotModule?: string): strin
|
|
|
378
378
|
.map((s) => s.charAt(0).toUpperCase() + s.slice(1))
|
|
379
379
|
.join("");
|
|
380
380
|
|
|
381
|
-
const typeImport = slotModule
|
|
382
|
-
? `// Import types from server slot if needed
|
|
383
|
-
// import type { LoaderData } from "
|
|
384
|
-
|
|
385
|
-
`
|
|
386
|
-
: "";
|
|
381
|
+
const typeImport = slotModule
|
|
382
|
+
? `// Import types from server slot if needed (adjust path to your project)
|
|
383
|
+
// import type { LoaderData } from "../../../spec/slots/${routeId}.slot";
|
|
384
|
+
|
|
385
|
+
`
|
|
386
|
+
: "";
|
|
387
387
|
|
|
388
388
|
return `/**
|
|
389
389
|
* ${pascalCase} Client Slot
|
|
390
390
|
* 브라우저에서 실행되는 클라이언트 로직
|
|
391
391
|
*/
|
|
392
392
|
|
|
393
|
-
import {
|
|
393
|
+
import { ManduClient } from "@mandujs/core/client";
|
|
394
394
|
import { useState, useCallback } from "react";
|
|
395
395
|
|
|
396
396
|
${typeImport}// 서버에서 전달받는 데이터 타입
|
|
@@ -399,7 +399,7 @@ interface ServerData {
|
|
|
399
399
|
[key: string]: unknown;
|
|
400
400
|
}
|
|
401
401
|
|
|
402
|
-
export default
|
|
402
|
+
export default ManduClient.island<ServerData>({
|
|
403
403
|
/**
|
|
404
404
|
* Setup Phase
|
|
405
405
|
* - 서버 데이터를 받아 클라이언트 상태 초기화
|