mirror of
https://github.com/TriliumNext/Trilium.git
synced 2025-12-12 14:11:05 -06:00
fix(breadcrumb): breadcrumb shown if there are no children
This commit is contained in:
parent
200fd76929
commit
223ba4643f
@ -8,7 +8,7 @@ import { FormListItem } from "./react/FormList";
|
|||||||
import NoteContext from "../components/note_context";
|
import NoteContext from "../components/note_context";
|
||||||
|
|
||||||
export default function Breadcrumb() {
|
export default function Breadcrumb() {
|
||||||
const { noteContext } = useNoteContext();
|
const { note, noteContext } = useNoteContext();
|
||||||
const notePath = buildNotePaths(noteContext?.notePathArray);
|
const notePath = buildNotePaths(noteContext?.notePathArray);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -16,7 +16,8 @@ export default function Breadcrumb() {
|
|||||||
{notePath.map((item, index) => (
|
{notePath.map((item, index) => (
|
||||||
<Fragment key={item}>
|
<Fragment key={item}>
|
||||||
<BreadcrumbItem notePath={item} />
|
<BreadcrumbItem notePath={item} />
|
||||||
<BreadcrumbSeparator notePath={item} activeNotePath={notePath[index+1]} noteContext={noteContext} />
|
{(index < notePath.length - 1 || note?.hasChildren()) &&
|
||||||
|
<BreadcrumbSeparator notePath={item} activeNotePath={notePath[index+1]} noteContext={noteContext} />}
|
||||||
</Fragment>
|
</Fragment>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user