fix rerender bug
This commit is contained in:
parent
7b1dd6314b
commit
74b445d244
|
|
@ -10,6 +10,8 @@ fal.config({
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const shapeUtils = [LiveImageShapeUtil];
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
const onEditorMount = (editor: Editor) => {
|
const onEditorMount = (editor: Editor) => {
|
||||||
editor.createShape({
|
editor.createShape({
|
||||||
|
|
@ -22,7 +24,7 @@ export default function Home() {
|
||||||
return (
|
return (
|
||||||
<main className="flex min-h-screen flex-col items-center justify-between">
|
<main className="flex min-h-screen flex-col items-center justify-between">
|
||||||
<div className="fixed inset-0">
|
<div className="fixed inset-0">
|
||||||
<Tldraw onMount={onEditorMount} shapeUtils={[LiveImageShapeUtil]} />
|
<Tldraw onMount={onEditorMount} shapeUtils={shapeUtils} />
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue