From 482178b7b6776960fc261c5848c0dfaf2fc06d8a Mon Sep 17 00:00:00 2001 From: zsviczian Date: Sun, 24 Sep 2023 19:24:04 +0200 Subject: [PATCH] lint --- src/components/MermaidToExcalidraw.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/components/MermaidToExcalidraw.tsx b/src/components/MermaidToExcalidraw.tsx index de189943e..0d6ad329b 100644 --- a/src/components/MermaidToExcalidraw.tsx +++ b/src/components/MermaidToExcalidraw.tsx @@ -1,5 +1,5 @@ import { useState, useRef, useEffect, useDeferredValue } from "react"; -import { AppState, BinaryFiles } from "../types"; +import { BinaryFiles } from "../types"; import { useApp } from "./App"; import { Button } from "./Button"; import { Dialog } from "./Dialog"; @@ -8,10 +8,7 @@ import { convertToExcalidrawElements, exportToCanvas, } from "../packages/excalidraw/index"; -import { - ExcalidrawElement, - NonDeletedExcalidrawElement, -} from "../element/types"; +import { NonDeletedExcalidrawElement } from "../element/types"; import { canvasToBlob } from "../data/blob"; import { ArrowRightIcon } from "./icons"; import Spinner from "./Spinner"; @@ -127,7 +124,7 @@ const MermaidToExcalidraw = ({ setText(data); } - }, [loading]); + }, [loading, selectedElements]); useEffect(() => { const renderExcalidrawPreview = async () => { @@ -186,7 +183,7 @@ const MermaidToExcalidraw = ({ } }; renderExcalidrawPreview(); - }, [deferredText]); + }, [deferredText, text]); const onClose = () => { app.setActiveTool({ type: "selection" });