- {/* Two column layout for DataTable and an empty component */}
-
-
-
+
+
+
diff --git a/src/Navbar.tsx b/src/Navbar.tsx
index 3b7b8f1..338a799 100644
--- a/src/Navbar.tsx
+++ b/src/Navbar.tsx
@@ -2,7 +2,6 @@ import "@mantine/core/styles.css";
import {} from "@mantine/core";
import "@/css/Navbar.css";
-// import favicon from "../public/favicon.ico";
import { useState } from "react";
diff --git a/src/components/SearchBar.tsx b/src/components/SearchBar.tsx
index cd94a6c..9f4751a 100644
--- a/src/components/SearchBar.tsx
+++ b/src/components/SearchBar.tsx
@@ -4,7 +4,7 @@ import { eventType, location } from "@/data/dataFilters";
import "@/css/SearchBar.css";
// import DataCard from "./DataCard";
import DataTable from "@components/DataTable";
-import PreviewCard from "./PreviewCard";
+import PreviewCard from "@/components/PreviewCard";
function SearchBarWithFilter() {
const [searchTerm, setSearchTerm] = useState("");
diff --git a/src/css/App.css b/src/css/App.css
index b470aec..a9a95aa 100644
--- a/src/css/App.css
+++ b/src/css/App.css
@@ -23,12 +23,6 @@
height: 500px;
padding-top: 50px;
}
-.column-content {
- display: flex;
- flex-direction: column;
- flex: 1;
-}
-
.footer {
padding: 2em;
From 89c4fb6e29fba2a1136e1a6eb44fc38f873a0396 Mon Sep 17 00:00:00 2001
From: Christine <132790780+aesteri@users.noreply.github.com>
Date: Sun, 6 Oct 2024 19:04:33 +0900
Subject: [PATCH 03/13] integrated checkpoints
---
src/components/SearchBar.tsx | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/components/SearchBar.tsx b/src/components/SearchBar.tsx
index 9f4751a..da3d6d6 100644
--- a/src/components/SearchBar.tsx
+++ b/src/components/SearchBar.tsx
@@ -15,8 +15,6 @@ function SearchBarWithFilter() {
beforeDate: "",
afterDate: "",
});
- const style = {
- };
useEffect(() => {
// add code to get data from server here
// setFilteredData(serverData)
@@ -87,9 +85,7 @@ function SearchBarWithFilter() {
{/* Display Filtered Data */}
From 4a46f278aa1fd5dfaf7c1ba64f85e81c6f22582c Mon Sep 17 00:00:00 2001
From: Christine <132790780+aesteri@users.noreply.github.com>
Date: Sun, 6 Oct 2024 19:11:16 +0900
Subject: [PATCH 04/13] fixed path
---
src/App.tsx | 2 +-
src/{ => components}/Navbar.tsx | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
rename src/{ => components}/Navbar.tsx (99%)
diff --git a/src/App.tsx b/src/App.tsx
index 0460ea3..40eafce 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,7 +1,7 @@
import "@mantine/core/styles.css";
import { MantineProvider } from "@mantine/core";
import { theme } from "@/theme";
-import Navbar from "@/Navbar.tsx";
+import Navbar from "@/components/Navbar";
import SearchBar from "@/components/SearchBar";
import "@/css/App.css";
diff --git a/src/Navbar.tsx b/src/components/Navbar.tsx
similarity index 99%
rename from src/Navbar.tsx
rename to src/components/Navbar.tsx
index 338a799..4c94c46 100644
--- a/src/Navbar.tsx
+++ b/src/components/Navbar.tsx
@@ -1,8 +1,6 @@
import "@mantine/core/styles.css";
import {} from "@mantine/core";
-
import "@/css/Navbar.css";
-
import { useState } from "react";
const mainLinksData = [
From 5665f938ac59adae8360d348d3eaeb0b421879d2 Mon Sep 17 00:00:00 2001
From: Christine <132790780+aesteri@users.noreply.github.com>
Date: Sun, 6 Oct 2024 19:47:27 +0900
Subject: [PATCH 05/13] fixed layout
---
src/components/SearchBar.tsx | 9 ++++++---
src/css/PreviewCard.css | 1 -
src/css/SearchBar.css | 15 +++++++++------
3 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/src/components/SearchBar.tsx b/src/components/SearchBar.tsx
index da3d6d6..17092ab 100644
--- a/src/components/SearchBar.tsx
+++ b/src/components/SearchBar.tsx
@@ -84,9 +84,12 @@ function SearchBarWithFilter() {
{/* Display Filtered Data */}
-
diff --git a/src/css/PreviewCard.css b/src/css/PreviewCard.css
index 449d707..11cf424 100644
--- a/src/css/PreviewCard.css
+++ b/src/css/PreviewCard.css
@@ -3,7 +3,6 @@
height: auto;
justify-content: center;
background-color: lightgrey;
- flex: 1;
}
.image-column {
diff --git a/src/css/SearchBar.css b/src/css/SearchBar.css
index 811c9cd..8168ca1 100644
--- a/src/css/SearchBar.css
+++ b/src/css/SearchBar.css
@@ -1,13 +1,16 @@
.results-container {
- height: auto;
- display: flex;
- justify-content: center;
- align-items: center;
flex: 1;
+ display: flex;
+ flex-direction: column;
}
-.results-container h2 {
- width: 100%;
+
+.table-contain-result {
+ text-align: center;
+ flex: 1;
+}
+
+.preview-contain-result {
text-align: center;
}
From 075cfe6372f5cbdd8fb781674649db6c5c5deeca Mon Sep 17 00:00:00 2001
From: BANANAPEEL202
Date: Sun, 6 Oct 2024 16:34:21 -0400
Subject: [PATCH 06/13] decoupling preview and data table from searchbar
---
src/App.tsx | 24 +++++++++++++++++++-----
src/components/SearchBar.tsx | 23 +++++------------------
2 files changed, 24 insertions(+), 23 deletions(-)
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
+
-
+
{/* */}
);
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() {
-
-
-
);
}
From f28ff6577b0907f6b880a8596e701250d58646dc Mon Sep 17 00:00:00 2001
From: BANANAPEEL202
Date: Sun, 6 Oct 2024 16:43:07 -0400
Subject: [PATCH 07/13] capitalizing the T in HyTech
---
src/components/Navbar.tsx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
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 }) => (
-
- {links}
+
+ {links}
{/* Optionally render active link or other content here */}
{hytechName}
);
-}
\ No newline at end of file
+}
From a4a7d726f94d2892c7af8d047e653be7ba7eeb7f Mon Sep 17 00:00:00 2001
From: BANANAPEEL202
Date: Sun, 6 Oct 2024 17:22:43 -0400
Subject: [PATCH 08/13] added dropdown download button
---
src/components/PreviewCard.tsx | 80 +++++++++++++++++++++++++++-------
1 file changed, 64 insertions(+), 16 deletions(-)
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",
}}
>
- }
- >
- MAT
-
- }
- >
- MCAP
-
+
+
@@ -94,3 +82,63 @@ function PreviewCard() {
}
export default PreviewCard;
+
+interface DownloadButtonProps {
+ buttonText: string;
+}
+
+export function DownloadButton({ buttonText }: DownloadButtonProps) {
+ return (
+
+ );
+}
From cb408ab2d3d3ebc852b12e03840ada0e0bd903c4 Mon Sep 17 00:00:00 2001
From: BANANAPEEL202