Skip to content

Build your personal knowledge base with Trilium Notes

fix(edited_notes): no message if there are no edited notes on a day

Elian Doran851169e061d5
diff --git a/apps/client/src/widgets/layout/InlineTitle.tsx b/apps/client/src/widgets/layout/InlineTitle.tsx
index 6dec10c100..bb043cca25 100644
--- a/apps/client/src/widgets/layout/InlineTitle.tsx
+++ b/apps/client/src/widgets/layout/InlineTitle.tsx
@@ -328,20 +328,19 @@ function EditedNotes() {
function EditedNotesContent({ note }: { note: FNote }) {
const editedNotes = useEditedNotes(note);
- return (
- <>
- {editedNotes?.map(editedNote => (
- <SimpleBadge
- key={editedNote.noteId}
- title={(
- <NoteLink
- notePath={editedNote.noteId}
- showNoteIcon
- />
- )}
- />
- ))}
- </>
- );
+ return (editedNotes !== undefined &&
+ (editedNotes.length > 0 ? editedNotes?.map(editedNote => (
+ <SimpleBadge
+ key={editedNote.noteId}
+ title={(
+ <NoteLink
+ notePath={editedNote.noteId}
+ showNoteIcon
+ />
+ )}
+ />
+ )) : (
+ <div className="no-edited-notes-found">{t("edited_notes.no_edited_notes_found")}</div>
+ )));
}
//#endregion