diff --git a/src/App.tsx b/src/App.tsx index 40eafce..1b93969 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -4,9 +4,14 @@ import { theme } from "@/theme"; import Navbar from "@/components/Navbar"; import SearchBar from "@/components/SearchBar"; import "@/css/App.css"; - +import DataTable from "@/components/DataTable"; +import PreviewCard from "./components/PreviewCard"; +import { data } from "@/data/sampledata"; +import { useState } from "react"; export default function App() { + const [filteredData, setFilteredData] = useState(data); + return (
@@ -15,14 +20,23 @@ export default function App() {
- +
+
+ +
+ +
+ +
+
+
-

made by Frontend team 2024

-
+

made by Frontend team 2024

+
- + {/* */}
); diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 4c94c46..1d1289d 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -10,7 +10,7 @@ const mainLinksData = [ ]; export default function Navbar() { - const hytechName = "Hytech Racing checkpoint 1"; + const hytechName = "HyTech Racing Checkpoint 1"; const [activeLink, setActiveLink] = useState(); const links = mainLinksData.map(({ name, url }) => ( - Logo - {links} + Logo + {links} {/* Optionally render active link or other content here */}

{hytechName}

); -} \ No newline at end of file +} diff --git a/src/components/PreviewCard.tsx b/src/components/PreviewCard.tsx index dc1f82d..d656484 100644 --- a/src/components/PreviewCard.tsx +++ b/src/components/PreviewCard.tsx @@ -1,6 +1,6 @@ import React from "react"; -import { Text, Button, Grid } from "@mantine/core"; -import { IconDownload } from "@tabler/icons-react"; +import { Text, Button, Grid, Menu, rem } from "@mantine/core"; +import { IconDownload, IconChevronDown, IconFile } from "@tabler/icons-react"; import "@/css/PreviewCard.css"; function PreviewCard() { @@ -72,20 +72,8 @@ function PreviewCard() { gap: "10px", }} > - - + + @@ -94,3 +82,63 @@ function PreviewCard() { } export default PreviewCard; + +interface DownloadButtonProps { + buttonText: string; +} + +export function DownloadButton({ buttonText }: DownloadButtonProps) { + return ( + + + + + + + } + > + File_1 + + + + } + > + File_2 + + + + } + > + File_3 + + + + ); +} diff --git a/src/components/SearchBar.tsx b/src/components/SearchBar.tsx index 17092ab..d130fa5 100644 --- a/src/components/SearchBar.tsx +++ b/src/components/SearchBar.tsx @@ -2,13 +2,13 @@ import React, { useState, useEffect } from "react"; import { data } from "@/data/sampledata"; import { eventType, location } from "@/data/dataFilters"; import "@/css/SearchBar.css"; -// import DataCard from "./DataCard"; -import DataTable from "@components/DataTable"; -import PreviewCard from "@/components/PreviewCard"; -function SearchBarWithFilter() { +interface SearchBarWithFilterProps { + setFilteredData: React.Dispatch>; +} + +function SearchBarWithFilter({ setFilteredData }: SearchBarWithFilterProps) { const [searchTerm, setSearchTerm] = useState(""); - const [filteredData, setFilteredData] = useState(data); const [filters, setFilters] = useState({ location: "", eventType: "", @@ -81,17 +81,7 @@ function SearchBarWithFilter() { return (
- {/* Display Filtered Data */} -
-
- -
- -
- -
-

Search and Filter Data

@@ -162,9 +152,6 @@ function SearchBarWithFilter() {
- - - ); }