fix(core): journal nav button icon (#8517)

close AF-1494
This commit is contained in:
forehalo 2024-10-17 04:16:30 +00:00
parent 1f950ff858
commit 4e640b4ffc
No known key found for this signature in database
GPG Key ID: 56709255DC7EC728

View File

@ -25,7 +25,8 @@ export const AppSidebarJournalButton = ({
const workbench = useService(WorkbenchService).workbench;
const location = useLiveData(workbench.location$);
const { openToday } = useJournalRouteHelper(docCollection);
const { isJournal } = useJournalInfoHelper(location.pathname.split('/')[1]);
const maybeDocId = location.pathname.split('/')[1];
const { isJournal } = useJournalInfoHelper(maybeDocId);
const handleOpenToday = useCatchEventCallback(
(e: MouseEvent) => {
@ -35,7 +36,7 @@ export const AppSidebarJournalButton = ({
);
const JournalIcon = useLiveData(
docDisplayMetaService.icon$(docCollection.id, {
docDisplayMetaService.icon$(maybeDocId, {
compareDate: new Date(),
})
);