1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-01-16 13:51:23 +01:00

Fix renderer not working on local (#5694)

This commit is contained in:
Arik Chakma 2024-05-18 01:25:46 +06:00 committed by GitHub
parent c277ac3746
commit 1af9829c04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 24 additions and 1 deletions

2
.gitignore vendored
View File

@ -31,3 +31,5 @@ tests-examples
/editor/* /editor/*
!/editor/readonly-editor.tsx !/editor/readonly-editor.tsx
!/editor/renderer/renderer.ts
!/editor/renderer/index.tsx

14
editor/renderer/index.tsx Normal file
View File

@ -0,0 +1,14 @@
export function Renderer(props: any) {
return (
<div className="fixed bottom-0 left-0 right-0 top-0 z-[9999] border bg-white p-5 text-black">
<h2 className="mb-2 text-xl font-semibold">Private Component</h2>
<p className="mb-4">
Renderer is a private component. If you are a collaborator and have
access to it. Run the following command:
</p>
<code className="mt-5 rounded-md bg-gray-800 p-2 text-white">
npm run generate-renderer
</code>
</div>
);
}

View File

@ -0,0 +1,5 @@
export function renderFlowJSON(data: any, options?: any) {
console.warn("renderFlowJSON is not implemented");
console.warn("run the following command to generate the renderer:");
console.warn("> npm run generate-renderer");
}

View File

@ -29,4 +29,6 @@ done
# ignore the worktree changes for the editor directory # ignore the worktree changes for the editor directory
git update-index --assume-unchanged editor/readonly-editor.tsx || true git update-index --assume-unchanged editor/readonly-editor.tsx || true
git update-index --assume-unchanged editor/renderer/index.tsx || true
git update-index --assume-unchanged editor/renderer/renderer.ts || true