diff --git a/frontend/src/components/path.jsx b/frontend/src/components/path.jsx index a5fe9b1..aedfbd1 100644 --- a/frontend/src/components/path.jsx +++ b/frontend/src/components/path.jsx @@ -15,11 +15,7 @@ export const Path = ({ fileInfo, currentDir }) => { currentDir == "/" ? `/${fileInfo.path}/` : `${currentDir}/${fileInfo.path}/`; - return ( - location.route(target)}> - {fileInfo.path} - - ); + return location.route(target)}>{fileInfo.path}; } return {fileInfo.path}; } @@ -34,7 +30,7 @@ export const Path = ({ fileInfo, currentDir }) => { } const target = `${splitPath.slice(0, i + 1).join("/")}/`; return ( - location.route(target)}> + location.route(target)}> {val} ); @@ -54,7 +50,6 @@ export const FolderIcon = ({ currentDir, fileInfo }) => { currentDir == "/" ? `${fileInfo.path.startsWith("/") ? "" : "/"}${fileInfo.path}/` : `${currentDir}/${fileInfo.path}/`; - console.log(target); return location.route(target)} />; }; @@ -64,11 +59,7 @@ export const DoubleDotPath = ({ currentDir }) => { const split = currentDir.split("/"); const target = split.slice(0, split.length - 1).join("/"); - return ( - location.route(target == "" ? "/" : target)}> - .. - - ); + return location.route(target == "" ? "/" : target)}>..; }; export const DoubleDotFolderIcon = ({ currentDir }) => { diff --git a/frontend/src/index.css b/frontend/src/index.css index 6b64454..a1cf449 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -45,6 +45,8 @@ body { a { color: #d4cb92; + text-decoration: underline; + cursor: pointer; } table { diff --git a/frontend/src/pages/Directory/index.jsx b/frontend/src/pages/Directory/index.jsx index 167f3cf..1bec42b 100644 --- a/frontend/src/pages/Directory/index.jsx +++ b/frontend/src/pages/Directory/index.jsx @@ -81,8 +81,8 @@ const Directory = () => { }, [searchQuery]); useEffect(() => { - if (!location.path.endsWith("/")) { - location.route(`${location.path}/`); + if (!location.url.endsWith("/")) { + location.route(`${location.path}/`, true); } if (location.path == "/") { document.title = `Mikochi`;