mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
@@ -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(),
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user