From a24c030bf6ce75474c4da566a2a2c7297df398f1 Mon Sep 17 00:00:00 2001 From: "yongen.loong" Date: Tue, 23 Jul 2024 01:00:49 +0800 Subject: [PATCH] fix: minimise debounce time --- components/workspace/editor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/workspace/editor.tsx b/components/workspace/editor.tsx index c55f58e..5ffca77 100644 --- a/components/workspace/editor.tsx +++ b/components/workspace/editor.tsx @@ -25,7 +25,7 @@ export default function Editor({ defaultValue }: { defaultValue?: string }) { const editorTheme = currentTheme === "light" ? githubLight : githubDark; const [value, setValue] = React.useState(defaultValue || ""); - const [debouncedValue] = useDebounce(value, 1000); + const [debouncedValue] = useDebounce(value, 100); const lang = getLang(pathname);