chore: switch storage of selected date in DailyReview (#2399)

Switch storage of selected date in DailyReview
This commit is contained in:
Athurg Gooth 2023-10-18 22:06:34 +08:00 committed by GitHub
parent 9bfb2d60b9
commit 22d331d6c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@ import classNames from "classnames";
import { last } from "lodash-es";
import { useEffect, useRef } from "react";
import toast from "react-hot-toast";
import useLocalStorage from "react-use/lib/useLocalStorage";
import useSessionStorage from "react-use/lib/useSessionStorage";
import useToggle from "react-use/lib/useToggle";
import DailyMemo from "@/components/DailyMemo";
import Empty from "@/components/Empty";
@ -24,7 +24,7 @@ const DailyReview = () => {
const userStore = useUserStore();
const user = useCurrentUser();
const { localSetting } = userStore.state.user as User;
const [currentDateStampRaw, setCurrentDateStamp] = useLocalStorage<number>(
const [currentDateStampRaw, setCurrentDateStamp] = useSessionStorage<number>(
"daily-review-datestamp",
getDateStampByDate(getNormalizedDateString())
);