Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed #125

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions web/src/components/dashboard/PrizeTable.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useEffect, useState, useCallback } from "react";
import DataTable, { TableColumn } from "react-data-table-component";
import "../../styles/component styles/prizetable.css"

type PrizeData = {
_id: string;
Expand Down Expand Up @@ -98,15 +99,16 @@ function PrizeTable() {
];

return (
<div style={{ width: "75%" }}>
<div className="dashboard-container-prize">
<div className="dashboard-prize">
<DataTable
title="Prizes"
columns={columns}
data={prizeData.filter((prize) => !prize.redeemed)}
pagination
highlightOnHover
/>
</div>
</div>
);
}

Expand Down
12 changes: 12 additions & 0 deletions web/src/components/spinner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from "react";
import "../styles/component styles/spinner.css";

const Spinner = () => {
return (
<div className="spinner-container">
<div className="spinner"></div>
</div>
);
};

export default Spinner;
3 changes: 2 additions & 1 deletion web/src/pages/Events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import logo from "../assets/primary_logo.svg";
import HamburgerMenu from "@components/HamburgerMenuAdmin";
import SearchBar from "@components/SearchBar";
import ErrorPage from "@pages/MobileErrorPage";
import Spinner from "@components/Spinner";

interface Event {
_id: string;
Expand Down Expand Up @@ -152,7 +153,7 @@ export default function Events() {
))}
</ul>
) : (
<h1>Loading</h1>
<Spinner />
)}
</>
)}
Expand Down
61 changes: 61 additions & 0 deletions web/src/styles/component styles/prizetable.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/* Ensure html and body take up full height */
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
height: auto;
background-color: #e1ebff; /* Matches your background */
font-family: "Open Sans", sans-serif;
}

.dashboard-container-prize {
width: 100vw;
display: flex;
flex-direction: column;
}

.dashboard-prize {
background-color: white;
padding: 20px;
border-radius: 10px;
width: 90%;
margin: auto;
position: relative;
flex-grow: 1;
}


.prize-table {
flex-grow: 1;
width: 100%;
}

.prize-table .rdt_Table {
background-color: white;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.prize-table .rdt_TableHead {
background-color: #f2f2f2;
font-weight: 600;
}

.prize-table .rdt_TableRow {
border-bottom: 1px solid #e0e0e0;
}

.prize-table .rdt_TableRow:hover {
background-color: #e1ebff;
}

.prize-table .rdt_Pagination {
margin-top: 20px;
display: flex;
justify-content: center;
}

.prize-table input[type="checkbox"] {
transform: scale(1.2);
}
24 changes: 24 additions & 0 deletions web/src/styles/component styles/spinner.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.spinner-container {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
margin: 30px;
}

.spinner {
width: 56px;
height: 56px;
border-radius: 50%;
background: radial-gradient(farthest-side, #03045e 94%, #0000) top/9px 9px no-repeat,
conic-gradient(#0000 30%, #03045e);
-webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 9px), #000 0);
animation: spinner-c7wet2 1s infinite linear;
}

@keyframes spinner-c7wet2 {
100% {
transform: rotate(1turn);
}
}

3 changes: 3 additions & 0 deletions web/src/styles/page styles/event.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ body {
min-height: 100vh;
margin: 0;
padding: 0;
height: auto;
font-family: "Open Sans", sans-serif;
}

Expand All @@ -28,6 +29,8 @@ body {
margin: auto;
position: relative;
flex-grow: 1;


}

.create-event-button {
Expand Down
Loading