diff --git a/src/App.tsx b/src/App.tsx index 213d272de..6d77afa1c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -85,9 +85,9 @@ function App() { , , , + , , , - , , , , diff --git a/src/ThreeEditor/components/Dialog/ClearHistoryDialog.tsx b/src/ThreeEditor/components/Dialog/ClearHistoryDialog.tsx index 6603bafb5..158a6fcf8 100644 --- a/src/ThreeEditor/components/Dialog/ClearHistoryDialog.tsx +++ b/src/ThreeEditor/components/Dialog/ClearHistoryDialog.tsx @@ -1,11 +1,12 @@ import { Button } from '@mui/material'; -import { useStore } from '../../../services/StoreService'; +import { StoreContext } from '../../../services/StoreService'; import { ConcreteDialogProps, CustomDialog } from './CustomDialog'; -export function ClearHistoryDialog({ onClose }: ConcreteDialogProps) { - const { yaptideEditor } = useStore(); - +export function ClearHistoryDialog({ + onClose, + yaptideEditor +}: ConcreteDialogProps>) { return ( >) { const [title, setTitle] = useState(yaptideEditor?.config.getKey('project/title')); const [description, setDescription] = useState( yaptideEditor?.config.getKey('project/description') diff --git a/src/ThreeEditor/components/Dialog/LoadFileDialog.tsx b/src/ThreeEditor/components/Dialog/LoadFileDialog.tsx index 4c8ae48d0..6186692d2 100644 --- a/src/ThreeEditor/components/Dialog/LoadFileDialog.tsx +++ b/src/ThreeEditor/components/Dialog/LoadFileDialog.tsx @@ -1,20 +1,21 @@ import { Button } from '@mui/material'; import Typography from '@mui/material/Typography'; -import { useStore } from '../../../services/StoreService'; +import { StoreContext } from '../../../services/StoreService'; import { EditorJson } from '../../js/EditorJson'; import { ConcreteDialogProps, CustomDialog } from './CustomDialog'; export function LoadFileDialog({ onClose, validVersion = true, - data -}: ConcreteDialogProps<{ - validVersion: boolean; - data: EditorJson; -}>) { - const { yaptideEditor } = useStore(); - + data, + yaptideEditor +}: ConcreteDialogProps< + { + validVersion: boolean; + data: EditorJson; + } & Pick +>) { return ( >) { return ( ) { return (