mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 06:18:45 +08:00
refactor(core): remove the unused compareDate field from DocDisplayIconOptions (#10095)
This commit is contained in:
@@ -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}`}>
|
||||
|
||||
+1
-3
@@ -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}`}>
|
||||
|
||||
Reference in New Issue
Block a user