diff options
author | Manuel Palenzuela Merino <manuel.palenzuela@datadoghq.com> | 2024-07-11 11:22:06 +0200 |
---|---|---|
committer | Manuel Palenzuela Merino <manuel.palenzuela@datadoghq.com> | 2024-07-11 11:22:06 +0200 |
commit | 7a8b457f96e18b945937966ee6ba7193d20165d1 (patch) | |
tree | 7ae2c5b185fb3bb6b4d45b0c284195acb30d8df0 /src/pages | |
parent | Components: Sidebar: Show link on hover (diff) | |
download | fs-tracer-frontend-7a8b457f96e18b945937966ee6ba7193d20165d1.tar.gz fs-tracer-frontend-7a8b457f96e18b945937966ee6ba7193d20165d1.tar.bz2 fs-tracer-frontend-7a8b457f96e18b945937966ee6ba7193d20165d1.zip |
Components: FileCompnent: Add filecomponent
Diffstat (limited to 'src/pages')
-rw-r--r-- | src/pages/Recent.tsx | 6 | ||||
-rw-r--r-- | src/pages/Search.tsx | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/pages/Recent.tsx b/src/pages/Recent.tsx index 76d9e2a..1ec1ebb 100644 --- a/src/pages/Recent.tsx +++ b/src/pages/Recent.tsx @@ -2,6 +2,8 @@ import { useEffect, useState, useCallback } from "react" import { useNavigate } from "react-router-dom" import SideBar from "../components/Sidebar/Sidebar" +import { FSTracerFile } from "../lib/types"; +import FileComponent from "../components/Other/FSTracerFile"; export default function Recent(props: any) { const navigate = useNavigate() @@ -46,9 +48,9 @@ export default function Recent(props: any) { <main className="flex-1 overflow-y-auto my-4"> <div className="flex flex-col items-center"> <div className="flex flex-col gap-2"> - {files.map((file: any) => ( + {files.map((file: FSTracerFile) => ( <div key={file.id} role="button" onClick={() => console.log("clocked file")}> - <p className="underline">file: {file.absolute_path}</p> + <FileComponent file={file} /> </div> )) } diff --git a/src/pages/Search.tsx b/src/pages/Search.tsx index 063da14..54816ff 100644 --- a/src/pages/Search.tsx +++ b/src/pages/Search.tsx @@ -2,6 +2,8 @@ import { useEffect, useState, useCallback } from "react" import { useNavigate } from "react-router-dom" import SideBar from "../components/Sidebar/Sidebar" +import { FSTracerFile } from "../lib/types"; +import FileComponent from "../components/Other/FSTracerFile"; export default function Search(props: any) { const navigate = useNavigate() @@ -58,9 +60,9 @@ export default function Search(props: any) { </div> <div className="flex flex-col items-center"> <div className="flex flex-col gap-2"> - {files.map((file: any) => ( + {files.map((file: FSTracerFile) => ( <div key={file.id} role="button" onClick={() => console.log("clocked file")}> - <p className="underline">file: {file.absolute_path}</p> + <FileComponent file={file} /> </div> )) } |