about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2024-06-23 10:32:33 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2024-06-23 10:32:33 +0200
commita34b1ef276da4a16b5e7ff9860c02831d7e281b7 (patch)
treebbf6b06060f013d8c8c088a67c20b8fe04c8a079
parentMisc: Use relative path for site icon (diff)
downloadfs-tracer-frontend-a34b1ef276da4a16b5e7ff9860c02831d7e281b7.tar.gz
fs-tracer-frontend-a34b1ef276da4a16b5e7ff9860c02831d7e281b7.tar.bz2
fs-tracer-frontend-a34b1ef276da4a16b5e7ff9860c02831d7e281b7.zip
Misc: Move type declaration to special folder
-rw-r--r--src/lib/types.tsx7
-rw-r--r--src/pages/Home.tsx8
2 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/types.tsx b/src/lib/types.tsx
new file mode 100644
index 0000000..8e0fda4
--- /dev/null
+++ b/src/lib/types.tsx
@@ -0,0 +1,7 @@
+type File = {
+  id: number
+  user_id: string
+  absolute_path: string
+  contents: string
+  timestamp: string
+}
diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx
index 6244ac5..8bda03b 100644
--- a/src/pages/Home.tsx
+++ b/src/pages/Home.tsx
@@ -2,14 +2,6 @@ import { useEffect, useState, useCallback } from "react"
 
 import { useNavigate } from "react-router-dom"
 
-interface File {
-  id: number
-  user_id: string
-  absolute_path: string
-  contents: string
-  timestamp: string
-}
-
 export default function Home(props: any) {
   const navigate = useNavigate()