Skip to content

Commit d6cead3

Browse files
committed
edited notes: better reuse of EditedNotes component with showNotePath prop
1 parent 8c1e1f4 commit d6cead3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apps/client/src/widgets/EditedNotes.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ import { joinElements } from "./react/react_utils";
99
interface EditedNotesProps {
1010
noteId?: string,
1111
dateFilter: string,
12+
showNotePath?: boolean,
1213
}
1314

14-
export default function EditedNotes({ noteId, dateFilter } : EditedNotesProps) {
15+
export default function EditedNotes({ noteId, dateFilter, showNotePath = true } : EditedNotesProps) {
1516
const [ editedNotes, setEditedNotes ] = useState<EditedNote[]>();
1617

1718
useEffect(() => {
@@ -40,7 +41,7 @@ export default function EditedNotes({ noteId, dateFilter } : EditedNotesProps) {
4041
<i>{`${editedNote.title} ${t("edited_notes.deleted")}`}</i>
4142
) : (
4243
<>
43-
{editedNote.notePath ? <NoteLink notePath={editedNote.notePath} showNotePath /> : <span>{editedNote.title}</span>}
44+
{editedNote.notePath ? <NoteLink notePath={editedNote.notePath} showNotePath={showNotePath} /> : <span>{editedNote.title}</span>}
4445
</>
4546
)}
4647
</span>

0 commit comments

Comments
 (0)