Skip to content

Commit

Permalink
Merge pull request #624 from marchhq/fix/notes-stack
Browse files Browse the repository at this point in the history
fix: persisted state for toggle in notes
  • Loading branch information
sajdakabir authored Nov 19, 2024
2 parents e279f08 + 384b10c commit 495c50a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/frontend/src/components/Notes/NotesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { useRouter } from "next/navigation"
import TextEditor from "@/src/components/atoms/Editor"
import { useAuth } from "@/src/contexts/AuthContext"
import useEditorHook from "@/src/hooks/useEditor.hook"
import usePersistedState from "@/src/hooks/usePersistedState"
import { Note } from "@/src/lib/@types/Items/Note"
import useNotesStore from "@/src/lib/store/notes.store"
import classNames from "@/src/utils/classNames"
Expand Down Expand Up @@ -42,7 +43,7 @@ const NotesPage: React.FC<Props> = ({ noteId }) => {
const editor = useEditorHook({ content, setContent, setIsSaved })
const [loading, setLoading] = useState(false)
const [notFound, setNotFound] = useState(false)
const [closeToggle, setCloseToggle] = useState(false)
const [closeToggle, setCloseToggle] = usePersistedState("closeToggle", true)
const [isInitialLoad, setIsInitialLoad] = useState(true)
const [isEditingTitle, setIsEditingTitle] = useState(false)

Expand Down

0 comments on commit 495c50a

Please sign in to comment.