feat: middle save

This commit is contained in:
Project_IO 2025-03-20 17:51:28 +09:00
parent 536af9b0e0
commit ca8300b27c

View file

@ -2,9 +2,29 @@ import { useLocation } from "react-router";
export function FileNavigator() {
const location = useLocation();
const split = location.pathname.substring(1, location.pathname.length).split("/");
const split = location.pathname === "/" ? Array<string>() : location.pathname.substring(1, location.pathname.length).split("/");
return <div>
return (
<div>
<a href="/">
<span>Index Directory</span>
</a>
{split.map((path, i) => {
if (i === split.length - 1) {
return (
<a key={i}>
<span>{path}</span>
</a>
);
}
</div>;
return (
<a key={i} href="">
<span>{path}</span>
<span>&gt;&gt;</span>
</a>
);
})}
</div>
);
}