fix: clicking last breadcrumb displayed "file menu" instead of "folder menu"

Massimo Melina committed Jun 16, 2023 at 14:55 UTC 93759eadf76af2812a859cd6ed6ad73fca314450
1 file changed +2 -2
frontend/src/Breadcrumbs.ts
+2 -2
@@ -28,7 +28,7 @@ export function Breadcrumbs() {
28 )
29 }
30
31 -function Breadcrumb({ path, label, current }:{ current?: boolean, path?: string, label?: string | ReactElement }) {
31 +function Breadcrumb({ path, label, current }:{ current?: boolean, path: string, label?: string | ReactElement }) {
32 const PAD = '\u00A0\u00A0' // make small elements easier to tap. Don't use min-width 'cause it requires display-inline that breaks word-wrapping
33 if (typeof label === 'string' && label.length < 3)
34 label = PAD + label + PAD
@@ -40,7 +40,7 @@ function Breadcrumb({ path, label, current }:{ current?: boolean, path?: string,
40 if (!current) return
41 if (typeof label !== 'string')
42 return reload()
43 - openFileMenu(new DirEntry(label), ev as any as MouseEvent, [
43 + openFileMenu(new DirEntry(path), ev as any as MouseEvent, [
44 {
45 label: t`Reload`,
46 icon: 'reload',