mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-24 02:01:49 +03:00
parent
1f950ff858
commit
4e640b4ffc
@ -25,7 +25,8 @@ export const AppSidebarJournalButton = ({
|
|||||||
const workbench = useService(WorkbenchService).workbench;
|
const workbench = useService(WorkbenchService).workbench;
|
||||||
const location = useLiveData(workbench.location$);
|
const location = useLiveData(workbench.location$);
|
||||||
const { openToday } = useJournalRouteHelper(docCollection);
|
const { openToday } = useJournalRouteHelper(docCollection);
|
||||||
const { isJournal } = useJournalInfoHelper(location.pathname.split('/')[1]);
|
const maybeDocId = location.pathname.split('/')[1];
|
||||||
|
const { isJournal } = useJournalInfoHelper(maybeDocId);
|
||||||
|
|
||||||
const handleOpenToday = useCatchEventCallback(
|
const handleOpenToday = useCatchEventCallback(
|
||||||
(e: MouseEvent) => {
|
(e: MouseEvent) => {
|
||||||
@ -35,7 +36,7 @@ export const AppSidebarJournalButton = ({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const JournalIcon = useLiveData(
|
const JournalIcon = useLiveData(
|
||||||
docDisplayMetaService.icon$(docCollection.id, {
|
docDisplayMetaService.icon$(maybeDocId, {
|
||||||
compareDate: new Date(),
|
compareDate: new Date(),
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user