Persist slice of redux state in local storage

This commit is contained in:
Peizhi Zheng
2021-01-14 20:46:41 -08:00
committed by GitHub
parent b1398742b9
commit 1df5004203
7 changed files with 61 additions and 24 deletions

View File

@@ -26,7 +26,7 @@ import DoubleArrowIcon from "@material-ui/icons/DoubleArrow";
import CloseIcon from "@material-ui/icons/Close";
import { AppState } from "./store";
import { paths } from "./paths";
import { makeTheme } from "./theme";
import { useTheme } from "./theme";
import { closeSnackbar } from "./actions/snackbarActions";
import ListItemLink from "./components/ListItemLink";
import SchedulersView from "./views/SchedulersView";
@@ -146,7 +146,7 @@ function SlideUpTransition(props: TransitionProps) {
}
function App(props: ConnectedProps<typeof connector>) {
const theme = makeTheme(props.themePreference);
const theme = useTheme(props.themePreference);
const classes = useStyles(theme)();
const [open, setOpen] = useState(true);
const toggleDrawer = () => setOpen(!open);