refactor(core): remove the unused compareDate field from DocDisplayIconOptions (#10095)

This commit is contained in:
L-Sun
2025-02-11 13:26:43 +00:00
parent ba52abe50f
commit 401ce70153
6 changed files with 5 additions and 18 deletions
@@ -16,9 +16,7 @@ export const AppTabJournal = ({ tab }: AppTabCustomFCProps) => {
const maybeDocId = location.pathname.split('/')[1];
const journalDate = useLiveData(journalService.journalDate$(maybeDocId));
const JournalIcon = useLiveData(
docDisplayMetaService.icon$(maybeDocId, { compareDate: new Date() })
);
const JournalIcon = useLiveData(docDisplayMetaService.icon$(maybeDocId));
const handleOpenToday = useCallback(() => {
const docId = journalService.ensureJournalByDate(new Date()).id;
@@ -94,9 +94,7 @@ const DocItem = ({ docRecord }: { docRecord: DocRecord }) => {
const docId = docRecord.id;
const i18n = useI18n();
const docDisplayMetaService = useService(DocDisplayMetaService);
const Icon = useLiveData(
docDisplayMetaService.icon$(docId, { compareDate: new Date() })
);
const Icon = useLiveData(docDisplayMetaService.icon$(docId));
const title = useLiveData(docDisplayMetaService.title$(docId));
return (
<WorkbenchLink aria-label={title} to={`/${docId}`}>
@@ -24,9 +24,7 @@ type Category = 'created' | 'updated';
const DocItem = ({ docId }: { docId: string }) => {
const docDisplayMetaService = useService(DocDisplayMetaService);
const Icon = useLiveData(
docDisplayMetaService.icon$(docId, { compareDate: new Date() })
);
const Icon = useLiveData(docDisplayMetaService.icon$(docId));
const title = useLiveData(docDisplayMetaService.title$(docId));
return (
<WorkbenchLink aria-label={title} to={`/${docId}`}>