diff --git a/client/src/Views/Components/CreateNoteModal/index.tsx b/client/src/Views/Components/CreateNoteModal/index.tsx index be29bdd..5578d11 100644 --- a/client/src/Views/Components/CreateNoteModal/index.tsx +++ b/client/src/Views/Components/CreateNoteModal/index.tsx @@ -65,12 +65,11 @@ const CreateNoteModal: React.FC = ({ setModalOpen, editNoteId, setEditNoteId, - previewMode, }) => { const globalState = useContext(store); const { state } = globalState; - const { darkMode, mdMode } = state; + const { darkMode, mdMode, previewMode } = state; const [wideView, toggleWideView] = useState(false); const [showPreview, togglePreview] = useState(previewMode); diff --git a/client/src/Views/Main.tsx b/client/src/Views/Main.tsx index 57099ca..3810593 100644 --- a/client/src/Views/Main.tsx +++ b/client/src/Views/Main.tsx @@ -105,7 +105,7 @@ const Main: FC = () => { const globalState = useContext(store); const { state } = globalState; - const { darkMode, mdMode, previewMode } = state; + const { darkMode, mdMode } = state; const classes = useStyles(darkMode)(); @@ -114,7 +114,7 @@ const Main: FC = () => { const [modalOpen, setModalOpen] = useState(false); const [editNoteId, setEditNoteId] = useState(''); - const noteProps = { noteState, setNoteState, previewMode }; + const noteProps = { noteState, setNoteState }; const modalProps = { ...noteProps, modalOpen, setModalOpen, editNoteId, setEditNoteId }; const getItems = async (): Promise => setNoteState(await noteStore.getNotes());