chore: update store selector

This commit is contained in:
boojack
2022-05-22 12:41:15 +08:00
parent 948b53393a
commit 2e5b120986
15 changed files with 79 additions and 75 deletions

View File

@ -35,9 +35,7 @@ const UsageHeatMap: React.FC<Props> = () => {
const usedDaysAmount = (tableConfig.width - 1) * tableConfig.height + todayDay;
const beginDayTimestemp = todayTimeStamp - usedDaysAmount * DAILY_TIMESTAMP;
const {
memo: { memos },
} = useAppSelector((state) => state);
const { memos } = useAppSelector((state) => state.memo);
const [allStat, setAllStat] = useState<DailyUsageStat[]>(getInitialUsageStat(usedDaysAmount, beginDayTimestemp));
const [popupStat, setPopupStat] = useState<DailyUsageStat | null>(null);
const [currentStat, setCurrentStat] = useState<DailyUsageStat | null>(null);