diff options
author | Manuel Palenzuela Merino <manuel.palenzuela@datadoghq.com> | 2024-07-12 16:30:35 +0200 |
---|---|---|
committer | Manuel Palenzuela Merino <manuel.palenzuela@datadoghq.com> | 2024-07-12 16:31:19 +0200 |
commit | bca1f621135431b6f62cabbce593f7261a805890 (patch) | |
tree | 323c48b81411f23869bb6fb116af6df74ad0dc1e | |
parent | Components: FileCompnent: Add filecomponent (diff) | |
download | fs-tracer-frontend-bca1f621135431b6f62cabbce593f7261a805890.tar.gz fs-tracer-frontend-bca1f621135431b6f62cabbce593f7261a805890.tar.bz2 fs-tracer-frontend-bca1f621135431b6f62cabbce593f7261a805890.zip |
Pages: File: Add file page
-rw-r--r-- | src/App.tsx | 4 | ||||
-rw-r--r-- | src/pages/File.tsx | 21 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/App.tsx b/src/App.tsx index b77acbc..8d5ebb4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -7,6 +7,7 @@ import Home from './pages/Home' import Login from './pages/Login' import Logout from './pages/Logout'; import Recent from './pages/Recent'; +import File from './pages/File'; import { useLocalStorage } from "@uidotdev/usehooks"; import { useState } from "react"; import Search from "./pages/Search"; @@ -42,6 +43,9 @@ function App() { <Route path="/logout" element={ <Logout supabase={supabase} session={session} setSession={setSession} timeframe={timeframe} setTimeframe={setTimeframe} /> } /> + <Route path="/file/:filepath" element={ + <File supabase={supabase} session={session} setSession={setSession} timeframe={timeframe} setTimeframe={setTimeframe} /> + } /> <Route path="*" element={<p>notfound</p>} /> </Routes> </BrowserRouter> diff --git a/src/pages/File.tsx b/src/pages/File.tsx new file mode 100644 index 0000000..f1377b2 --- /dev/null +++ b/src/pages/File.tsx @@ -0,0 +1,21 @@ +import { useParams } from "react-router-dom" +import SideBar from "../components/Sidebar/Sidebar" + +export default function File() { + let { filepath } = useParams(); + + console.log("FILEPATH: ", filepath) + + return ( + <> + <div className="flex h-screen"> + <SideBar /> + <main className="flex-1 overflow-y-auto my-4"> + <div className="flex flex-col items-center"> + {filepath} + </div> + </main> + </div> + </> + ) +} |