use redux for NoteCreator state management (#494)

* use redux for NoteCreator state management

This fixes a bug where the modal closes while replying to a note. This happens if the thread re-renders while you are replying.

Drafts of notes are also now automatically saved unless the user clicks the cancel button.

* fix modal closing bug

* really fix modal closing bug

* fix rebase
This commit is contained in:
Sam Samskies
2023-04-08 02:48:57 -10:00
committed by GitHub
parent eab07add8c
commit b650a1684f
5 changed files with 156 additions and 57 deletions

View File

@ -1,9 +1,11 @@
import { configureStore } from "@reduxjs/toolkit";
import { reducer as LoginReducer } from "State/Login";
import { reducer as NoteCreatorReducer } from "State/NoteCreator";
const store = configureStore({
reducer: {
login: LoginReducer,
noteCreator: NoteCreatorReducer,
},
});