From 405b63e50062ac8aca5a33f097f78dfcce5a4d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aykut=20Sara=C3=A7?= Date: Wed, 16 Feb 2022 15:37:54 +0300 Subject: [PATCH] replace with global data --- src/containers/LiveEditor/index.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/containers/LiveEditor/index.tsx b/src/containers/LiveEditor/index.tsx index 71d88de..ec87081 100644 --- a/src/containers/LiveEditor/index.tsx +++ b/src/containers/LiveEditor/index.tsx @@ -20,6 +20,7 @@ import { } from "react-icons/ai"; import { useLoading } from "src/hooks/useLoading"; import toast from "react-hot-toast"; +import { defaultConfig } from "src/constants/data"; const StyledLiveEditor = styled.div` position: relative; @@ -53,11 +54,7 @@ export const LiveEditor: React.FC<{ const canvasRef = React.useRef(null); const wrapperRef = React.useRef(null); - const [config] = useLocalStorage("config", { - layout: "LEFT", - expand: true, - controls: true, - }); + const [config] = useLocalStorage("config", defaultConfig); React.useEffect(() => { if (wrapperRef.current) wrapperRef.current?.resetTransform();