mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-20 05:12:54 +08:00
replace with global data
This commit is contained in:
parent
89720cc828
commit
405b63e500
@ -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<CanvasRef | null>(null);
|
||||
const wrapperRef = React.useRef<ReactZoomPanPinchRef | null>(null);
|
||||
const [config] = useLocalStorage<StorageConfig>("config", {
|
||||
layout: "LEFT",
|
||||
expand: true,
|
||||
controls: true,
|
||||
});
|
||||
const [config] = useLocalStorage<StorageConfig>("config", defaultConfig);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (wrapperRef.current) wrapperRef.current?.resetTransform();
|
||||
|
Loading…
x
Reference in New Issue
Block a user