Skip to content

Commit 263f3c7

Browse files
add full figma file import support (with buggy preview)
1 parent c4e1a39 commit 263f3c7

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

editor/hooks/use-design.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ interface UseDesignFromFileAndNode {
5252
}
5353

5454
export function useDesign({
55-
use_session_cache = true,
55+
use_session_cache = false,
5656
type,
5757
...props
5858
}: UseDesignProp) {

editor/pages/to-code/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import {
2626
import { PendingState } from "core/utility-types";
2727
import { DesignInput } from "@designto/config/input";
2828
import { convert } from "@design-sdk/figma-node-conversion";
29+
import { mapper } from "@design-sdk/figma-remote";
2930

3031
const pending_workspace_state = createPendingWorkspaceState();
3132
//
@@ -128,7 +129,8 @@ export default function Page() {
128129
id: page.id,
129130
name: page.name,
130131
children: page["children"]?.map((child) => {
131-
return convert.intoReflectNode(child);
132+
const _mapped = mapper.mapFigmaRemoteToFigma(child);
133+
return convert.intoReflectNode(_mapped);
132134
}),
133135
type: "design",
134136
})),

0 commit comments

Comments
 (0)