feat(breadcrumb): hide note paths if only one

This commit is contained in:
Elian Doran 2025-12-14 11:49:16 +02:00
parent be923ad2b7
commit 860a903336
No known key found for this signature in database

View File

@ -332,13 +332,14 @@ function AttributesPane({ note, noteContext, attributesShown, setAttributesShown
//#region Note paths
function NotePaths({ note, hoistedNoteId, notePath }: StatusBarContext) {
const sortedNotePaths = useSortedNotePaths(note, hoistedNoteId);
const count = sortedNotePaths?.length ?? 0;
return (
return (count > 1 &&
<StatusBarDropdown
title={t("status_bar.note_paths_title")}
dropdownContainerClassName="dropdown-note-paths"
icon="bx bx-directions"
text={t("status_bar.note_paths", { count: sortedNotePaths?.length })}
text={t("status_bar.note_paths", { count })}
>
<NotePathsWidget
sortedNotePaths={sortedNotePaths}