diff --git a/.env b/.env index e43d662..ea302a4 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -VITE_API_URL=api-url:port \ No newline at end of file +VITE_API_URL=api-url:port diff --git a/package-lock.json b/package-lock.json index c56c088..efd10e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "@mantine/hooks": "^7.13.1", "@tabler/icons-react": "3.17.0", "dayjs": "^1.11.13", - "nuqs": "^2.2.1", + "nuqs": "^2.2.3", "react": "^18.3.1", "react-dom": "^18.3.1", "react-router-dom": "^6.27.0", @@ -4794,10 +4794,11 @@ } }, "node_modules/express": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", - "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "dev": true, + "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -4818,7 +4819,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -4833,6 +4834,10 @@ }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/express/node_modules/debug": { @@ -6416,9 +6421,9 @@ "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true, "funding": [ { @@ -6488,9 +6493,9 @@ } }, "node_modules/nuqs": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/nuqs/-/nuqs-2.2.1.tgz", - "integrity": "sha512-P0swZtg6k9LRXzlT9gQAFtQg25Edan2Evt5vwyGvh00Z+rHH19gb2ZajU/E/SfhwE858aM/jb+wJziWbbwSlcg==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/nuqs/-/nuqs-2.2.3.tgz", + "integrity": "sha512-nMCcUW06KSqEXA0xp+LiRqDpIE59BVYbjZLe0HUisJAlswfihHYSsAjYTzV0lcE1thfh8uh+LqUHGdQ8qq8rfA==", "license": "MIT", "dependencies": { "mitt": "^3.0.1" @@ -6713,9 +6718,9 @@ "license": "MIT" }, "node_modules/path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", "dev": true, "license": "MIT" }, diff --git a/package.json b/package.json index 40add0d..27e0a47 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "@mantine/hooks": "^7.13.1", "@tabler/icons-react": "3.17.0", "dayjs": "^1.11.13", - "nuqs": "^2.2.1", + "nuqs": "^2.2.3", "react": "^18.3.1", "react-dom": "^18.3.1", "react-router-dom": "^6.27.0", diff --git a/src/components/DataTable.tsx b/src/components/DataTable.tsx index ad11740..2da86b2 100644 --- a/src/components/DataTable.tsx +++ b/src/components/DataTable.tsx @@ -1,5 +1,6 @@ import { Table } from "@mantine/core"; import { useMantineTheme } from "@mantine/core"; +import { Input, Textarea } from "@mantine/core"; interface DataTableProps { data?: MCAPFileInformation[]; @@ -17,7 +18,7 @@ export default function DataTable({ setSelectedData, }: DataTableProps) { const theme = useMantineTheme(); - + const setPreviewData = (file: MCAPFileInformation) => { if (selectedRow === file.id) { setSelectedRow(""); @@ -30,8 +31,10 @@ export default function DataTable({ // Take out when API server team implements filename id in their get route const getFileNameWithoutExtension = (fileNameWithExtension: string) => { - const lastDotIndex = fileNameWithExtension.lastIndexOf('.'); - return lastDotIndex !== -1 ? fileNameWithExtension.slice(0, lastDotIndex) : fileNameWithExtension; + const lastDotIndex = fileNameWithExtension.lastIndexOf("."); + return lastDotIndex !== -1 + ? fileNameWithExtension.slice(0, lastDotIndex) + : fileNameWithExtension; }; const rows = !data ? ( @@ -51,18 +54,38 @@ export default function DataTable({ setPreviewData(file)} - bg={selectedRow === file.id ? theme.primaryColor : ""} > - {getFileNameWithoutExtension(file.mcap_files[0].file_name)} + + {getFileNameWithoutExtension(file.mcap_files[0].file_name)} + {file.date} {file.location} - {file.notes} + + {/* Change back to notes once notes field is implemented in the server */} + {/* {file.car_model} */} + + +