chore(react): fix note path when empty

This commit is contained in:
Elian Doran 2025-08-25 16:15:13 +03:00
parent 50c4301a34
commit 25d5d51085
No known key found for this signature in database

View File

@ -29,19 +29,18 @@ export default function NotePathsTab({ note, hoistedNoteId, notePath }: TabConte
return (
<div class="note-paths-widget">
{sortedNotePaths?.length && (
<>
<div className="note-path-intro">
{sortedNotePaths.length > 0 ? t("note_paths.intro_placed") : t("note_paths.intro_not_placed")}
{sortedNotePaths?.length ? t("note_paths.intro_placed") : t("note_paths.intro_not_placed")}
</div>
<ul className="note-path-list">
{sortedNotePaths.map(sortedNotePath => (
{sortedNotePaths?.length ? sortedNotePaths.map(sortedNotePath => (
<NotePath
currentNotePath={notePath}
notePathRecord={sortedNotePath}
/>
))}
)) : undefined}
</ul>
<Button
@ -49,7 +48,6 @@ export default function NotePathsTab({ note, hoistedNoteId, notePath }: TabConte
text={t("note_paths.clone_button")}
/>
</>
)}
</div>
)
}