mirror of
https://github.com/zadam/trilium.git
synced 2025-12-06 07:24:25 +01:00
edited notes: better reuse of EditedNotes component with showNotePath prop
This commit is contained in:
parent
01f571e041
commit
fb2dd0b2dc
@ -9,9 +9,10 @@ import { joinElements } from "./react/react_utils";
|
||||
interface EditedNotesProps {
|
||||
noteId?: string,
|
||||
dateFilter: string,
|
||||
showNotePath?: boolean,
|
||||
}
|
||||
|
||||
export default function EditedNotes({ noteId, dateFilter } : EditedNotesProps) {
|
||||
export default function EditedNotes({ noteId, dateFilter, showNotePath = true } : EditedNotesProps) {
|
||||
const [ editedNotes, setEditedNotes ] = useState<EditedNote[]>();
|
||||
|
||||
useEffect(() => {
|
||||
@ -40,7 +41,7 @@ export default function EditedNotes({ noteId, dateFilter } : EditedNotesProps) {
|
||||
<i>{`${editedNote.title} ${t("edited_notes.deleted")}`}</i>
|
||||
) : (
|
||||
<>
|
||||
{editedNote.notePath ? <NoteLink notePath={editedNote.notePath} showNotePath /> : <span>{editedNote.title}</span>}
|
||||
{editedNote.notePath ? <NoteLink notePath={editedNote.notePath} showNotePath={showNotePath} /> : <span>{editedNote.title}</span>}
|
||||
</>
|
||||
)}
|
||||
</span>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user