+ {/*
*/}
+
{rushCategory?.events.map((event, index) => (
-
+ //
+
))}
diff --git a/src/components/NavSidebar.tsx b/src/components/NavSidebar.tsx
index ac7b222..6aa49aa 100644
--- a/src/components/NavSidebar.tsx
+++ b/src/components/NavSidebar.tsx
@@ -41,7 +41,7 @@ export default function NavSidebar() {
>
-
+
@@ -69,7 +69,7 @@ export default function NavSidebar() {
-
+{/*
-
+ */}
>
);
}
From 621a7d0b5a0003f457530d60489fa4f40470bac5 Mon Sep 17 00:00:00 2001
From: William De Rocco <93288641+wderocco8@users.noreply.github.com>
Date: Thu, 25 Jul 2024 15:15:54 -0400
Subject: [PATCH 08/24] fixed missing flowbite dependencies
---
package-lock.json | 173 ++++++++++++++++++++++---
package.json | 5 +-
src/app/globals.css | 2 +-
src/components/dashboard/EventCard.tsx | 44 ++++---
src/types/Events.tsx | 2 +-
tailwind.config.ts | 7 +-
6 files changed, 193 insertions(+), 40 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index dd186aa..d6e9922 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -26,8 +26,9 @@
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
- "postcss": "^8",
- "tailwindcss": "^3.4.1",
+ "autoprefixer": "^10.4.19",
+ "postcss": "^8.4.40",
+ "tailwindcss": "^3.4.7",
"typescript": "^5"
}
},
@@ -674,6 +675,43 @@
"resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
"integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg=="
},
+ "node_modules/autoprefixer": {
+ "version": "10.4.19",
+ "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz",
+ "integrity": "sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/autoprefixer"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "dependencies": {
+ "browserslist": "^4.23.0",
+ "caniuse-lite": "^1.0.30001599",
+ "fraction.js": "^4.3.7",
+ "normalize-range": "^0.1.2",
+ "picocolors": "^1.0.0",
+ "postcss-value-parser": "^4.2.0"
+ },
+ "bin": {
+ "autoprefixer": "bin/autoprefixer"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.1.0"
+ }
+ },
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
@@ -709,6 +747,38 @@
"node": ">=8"
}
},
+ "node_modules/browserslist": {
+ "version": "4.23.2",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.2.tgz",
+ "integrity": "sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "dependencies": {
+ "caniuse-lite": "^1.0.30001640",
+ "electron-to-chromium": "^1.4.820",
+ "node-releases": "^2.0.14",
+ "update-browserslist-db": "^1.1.0"
+ },
+ "bin": {
+ "browserslist": "cli.js"
+ },
+ "engines": {
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
+ }
+ },
"node_modules/busboy": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
@@ -729,9 +799,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001609",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001609.tgz",
- "integrity": "sha512-JFPQs34lHKx1B5t1EpQpWH4c+29zIyn/haGsbpfq3suuV9v56enjFt23zqijxGTMwy1p/4H2tjnQMY+p1WoAyA==",
+ "version": "1.0.30001643",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001643.tgz",
+ "integrity": "sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg==",
"funding": [
{
"type": "opencollective",
@@ -906,11 +976,26 @@
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="
},
+ "node_modules/electron-to-chromium": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.1.tgz",
+ "integrity": "sha512-FKbOCOQ5QRB3VlIbl1LZQefWIYwszlBloaXcY2rbfpu9ioJnNh3TK03YtIDKDo3WKBi8u+YV4+Fn2CkEozgf4w==",
+ "dev": true
+ },
"node_modules/emoji-regex": {
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="
},
+ "node_modules/escalade": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz",
+ "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/fast-glob": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
@@ -999,6 +1084,19 @@
"url": "https://github.com/sponsors/isaacs"
}
},
+ "node_modules/fraction.js": {
+ "version": "4.3.7",
+ "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",
+ "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==",
+ "dev": true,
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "type": "patreon",
+ "url": "https://github.com/sponsors/rawify"
+ }
+ },
"node_modules/fsevents": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
@@ -1388,6 +1486,12 @@
"node": "^10 || ^12 || >=14"
}
},
+ "node_modules/node-releases": {
+ "version": "2.0.18",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz",
+ "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==",
+ "dev": true
+ },
"node_modules/normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
@@ -1396,6 +1500,15 @@
"node": ">=0.10.0"
}
},
+ "node_modules/normalize-range": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
+ "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/oauth": {
"version": "0.9.15",
"resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz",
@@ -1487,9 +1600,9 @@
}
},
"node_modules/picocolors": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
- "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz",
+ "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew=="
},
"node_modules/picomatch": {
"version": "2.3.1",
@@ -1519,9 +1632,9 @@
}
},
"node_modules/postcss": {
- "version": "8.4.38",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz",
- "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==",
+ "version": "8.4.40",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.40.tgz",
+ "integrity": "sha512-YF2kKIUzAofPMpfH6hOi2cGnv/HrUlfucspc7pDyvv7kGdqXrfj8SCl/t8owkEgKEuu8ZcRjSOxFxVLqwChZ2Q==",
"funding": [
{
"type": "opencollective",
@@ -1538,7 +1651,7 @@
],
"dependencies": {
"nanoid": "^3.3.7",
- "picocolors": "^1.0.0",
+ "picocolors": "^1.0.1",
"source-map-js": "^1.2.0"
},
"engines": {
@@ -2027,9 +2140,9 @@
}
},
"node_modules/tailwindcss": {
- "version": "3.4.3",
- "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.3.tgz",
- "integrity": "sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==",
+ "version": "3.4.7",
+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.7.tgz",
+ "integrity": "sha512-rxWZbe87YJb4OcSopb7up2Ba4U82BoiSGUdoDr3Ydrg9ckxFS/YWsvhN323GMcddgU65QRy7JndC7ahhInhvlQ==",
"dependencies": {
"@alloc/quick-lru": "^5.2.0",
"arg": "^5.0.2",
@@ -2129,6 +2242,36 @@
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
},
+ "node_modules/update-browserslist-db": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz",
+ "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "dependencies": {
+ "escalade": "^3.1.2",
+ "picocolors": "^1.0.1"
+ },
+ "bin": {
+ "update-browserslist-db": "cli.js"
+ },
+ "peerDependencies": {
+ "browserslist": ">= 4.21.0"
+ }
+ },
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
diff --git a/package.json b/package.json
index 2906e36..3ac352f 100644
--- a/package.json
+++ b/package.json
@@ -27,8 +27,9 @@
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
- "postcss": "^8",
- "tailwindcss": "^3.4.1",
+ "autoprefixer": "^10.4.19",
+ "postcss": "^8.4.40",
+ "tailwindcss": "^3.4.7",
"typescript": "^5"
}
}
diff --git a/src/app/globals.css b/src/app/globals.css
index bd6213e..b5c61c9 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -1,3 +1,3 @@
@tailwind base;
@tailwind components;
-@tailwind utilities;
\ No newline at end of file
+@tailwind utilities;
diff --git a/src/components/dashboard/EventCard.tsx b/src/components/dashboard/EventCard.tsx
index 8955aa3..f3b974b 100644
--- a/src/components/dashboard/EventCard.tsx
+++ b/src/components/dashboard/EventCard.tsx
@@ -1,31 +1,35 @@
-import { Event } from "@/types/Events";
-import { Card } from "flowbite-react";
-import Image from "next/image";
+import { DashboardEvent } from "@/types/Events";
+import { Badge, Card } from "flowbite-react";
+import { useRouter } from 'next/navigation'
import Timestamp from "react-timestamp";
interface EventCardProps {
- event: Event
+ event: DashboardEvent
}
export default function EventCard({
event
}: EventCardProps) {
+ const router = useRouter();
return (
-
+
router.push(`/checkin/${event._id}`)}
+ >
+
+ {event.name}
+
+
+
+
+
+ Location: {event.location}
+
+
+ Status: Checked-in
+
+
)
};
\ No newline at end of file
diff --git a/src/types/Events.tsx b/src/types/Events.tsx
index 121f215..b14a9ca 100644
--- a/src/types/Events.tsx
+++ b/src/types/Events.tsx
@@ -21,6 +21,6 @@ export interface Event {
attendeesId: string,
}
-interface DashboardEvent extends Event {
+export interface DashboardEvent extends Event {
checkedIn: boolean,
}
\ No newline at end of file
diff --git a/tailwind.config.ts b/tailwind.config.ts
index ca64324..3dfc77a 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -1,4 +1,5 @@
import type { Config } from "tailwindcss"
+const flowbite = require("flowbite-react/tailwind");
const config = {
darkMode: ["class"],
@@ -7,6 +8,7 @@ const config = {
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',
'./src/**/*.{ts,tsx}',
+ flowbite.content(),
],
prefix: "",
theme: {
@@ -34,7 +36,10 @@ const config = {
},
},
},
- plugins: [require("tailwindcss-animate")],
+ plugins: [
+ require("tailwindcss-animate"),
+ flowbite.plugin(),
+ ],
} satisfies Config
export default config
\ No newline at end of file
From e685a29b88b067ad93fb9f2da8a10295718945f5 Mon Sep 17 00:00:00 2001
From: William De Rocco <93288641+wderocco8@users.noreply.github.com>
Date: Thu, 25 Jul 2024 15:30:50 -0400
Subject: [PATCH 09/24] added status icon depending on if rush event is passed
due
---
src/components/dashboard/EventCard.tsx | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/components/dashboard/EventCard.tsx b/src/components/dashboard/EventCard.tsx
index f3b974b..8954826 100644
--- a/src/components/dashboard/EventCard.tsx
+++ b/src/components/dashboard/EventCard.tsx
@@ -11,14 +11,19 @@ export default function EventCard({
event
}: EventCardProps) {
const router = useRouter();
+
+ const eventDeadline = new Date(event.deadline);
+ const isEventPassed = eventDeadline < new Date();
+
return (
-
router.push(`/checkin/${event._id}`)}
>
-
+
+
{event.name}
From 15cd59c99b210fe925fbe4b2073947eaf6606fe1 Mon Sep 17 00:00:00 2001
From: William De Rocco <93288641+wderocco8@users.noreply.github.com>
Date: Thu, 25 Jul 2024 16:38:35 -0400
Subject: [PATCH 10/24] fixed rush navSidebar avatar
---
src/components/NavSidebar.tsx | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/components/NavSidebar.tsx b/src/components/NavSidebar.tsx
index 6aa49aa..76dca58 100644
--- a/src/components/NavSidebar.tsx
+++ b/src/components/NavSidebar.tsx
@@ -48,9 +48,7 @@ export default function NavSidebar() {
{session ? (
}
- label={
}
+ label={
}
arrowIcon={false}
inline
>
@@ -58,7 +56,6 @@ export default function NavSidebar() {
{session?.user?.name}
{session?.user?.email}
-
signOut({ callbackUrl: "/" })}>
Sign out
From 6b7dd099dcb89aa3e4a7f19ae0800a405d9ca6af Mon Sep 17 00:00:00 2001
From: William De Rocco <93288641+wderocco8@users.noreply.github.com>
Date: Thu, 25 Jul 2024 16:55:38 -0400
Subject: [PATCH 11/24] added more styling to EventCard component
---
src/components/dashboard/EventCard.tsx | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/components/dashboard/EventCard.tsx b/src/components/dashboard/EventCard.tsx
index 8954826..b4ece50 100644
--- a/src/components/dashboard/EventCard.tsx
+++ b/src/components/dashboard/EventCard.tsx
@@ -15,12 +15,26 @@ export default function EventCard({
const eventDeadline = new Date(event.deadline);
const isEventPassed = eventDeadline < new Date();
+ const handleEventClick = () => {
+ if (!isEventPassed) {
+ router.push(`/checkin/${event._id}`)
+ }
+ }
+
return (
router.push(`/checkin/${event._id}`)}
+ className={`${isEventPassed ? "bg-gray-200 cursor-not-allowed" : "cursor-pointer"}`}
+ renderImage={() => (
+
+
+ {isEventPassed &&
}
+
+ )}
+ onClick={handleEventClick}
>
From 77314e342ad5afdbfaf1938a2b3d0981ae120e49 Mon Sep 17 00:00:00 2001
From: William De Rocco <93288641+wderocco8@users.noreply.github.com>
Date: Thu, 25 Jul 2024 19:02:43 -0400
Subject: [PATCH 12/24] added checkin statuses to EventCard
---
src/app/dashboard/page.tsx | 9 ++++-----
src/components/dashboard/EventCard.tsx | 25 +++++++++++++++++++++----
2 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx
index 7b22571..08ce411 100644
--- a/src/app/dashboard/page.tsx
+++ b/src/app/dashboard/page.tsx
@@ -1,8 +1,8 @@
"use client"
import { useState, useEffect } from "react"
-import { useSession, signOut } from "next-auth/react";
-import { Event, RushCategory } from "@/types/Events"
+import { useSession } from "next-auth/react";
+import { RushCategory } from "@/types/Events"
import { useRouter } from 'next/navigation'
import Loader from "@/components/Loader"
import EventCard from "@/components/dashboard/EventCard";
@@ -17,12 +17,11 @@ export default function Dashboard({ params }: { params: { id: string } }) {
// ensure user is defined
if (!session?.user) return;
- // TODO: pass this into API
- // const email = session.user.email
+ const email = session.user.email
const fetchRushEvents = async () => {
try {
- const response = await fetch(`${process.env.NEXT_PUBLIC_API_BASE_URL}/events/rush/default`);
+ const response = await fetch(`${process.env.NEXT_PUBLIC_API_BASE_URL}/events/rush/default/${email}`);
if (!response.ok) {
// router.push("/checkin/error");
setError(new Error("Failed to fetch event"));
diff --git a/src/components/dashboard/EventCard.tsx b/src/components/dashboard/EventCard.tsx
index b4ece50..922807d 100644
--- a/src/components/dashboard/EventCard.tsx
+++ b/src/components/dashboard/EventCard.tsx
@@ -1,6 +1,7 @@
import { DashboardEvent } from "@/types/Events";
import { Badge, Card } from "flowbite-react";
import { useRouter } from 'next/navigation'
+import { useState } from "react";
import Timestamp from "react-timestamp";
interface EventCardProps {
@@ -14,16 +15,31 @@ export default function EventCard({
const eventDeadline = new Date(event.deadline);
const isEventPassed = eventDeadline < new Date();
+ const disabled = isEventPassed || event.checkedIn
const handleEventClick = () => {
- if (!isEventPassed) {
+ if (!disabled) {
router.push(`/checkin/${event._id}`)
}
}
+ const renderStatus = () => (
+ event.checkedIn ? (
+ Checked-in
+ ) : (
+ <>
+ {isEventPassed ? (
+ Did not attend
+ ) : (
+ Not checked-in
+ )}
+ >
+ )
+ )
+
return (
(
- {isEventPassed &&
}
+ {disabled &&
}
)}
onClick={handleEventClick}
@@ -47,7 +63,8 @@ export default function EventCard({
Location: {event.location}
- Status: Checked-in
+ Status:
+ {renderStatus()}
)
From ffc2a1ea473c1191b6667e489db8ef539723e606 Mon Sep 17 00:00:00 2001
From: William De Rocco <93288641+wderocco8@users.noreply.github.com>
Date: Thu, 25 Jul 2024 20:57:03 -0400
Subject: [PATCH 13/24] sending POST to backend
---
src/app/dashboard/page.tsx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx
index 08ce411..279163f 100644
--- a/src/app/dashboard/page.tsx
+++ b/src/app/dashboard/page.tsx
@@ -21,7 +21,11 @@ export default function Dashboard({ params }: { params: { id: string } }) {
const fetchRushEvents = async () => {
try {
- const response = await fetch(`${process.env.NEXT_PUBLIC_API_BASE_URL}/events/rush/default/${email}`);
+ const response = await fetch(`${process.env.NEXT_PUBLIC_API_BASE_URL}/events/rush/default`, {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ email: email })
+ });
if (!response.ok) {
// router.push("/checkin/error");
setError(new Error("Failed to fetch event"));
@@ -42,10 +46,8 @@ export default function Dashboard({ params }: { params: { id: string } }) {
}
return (
- {/*
*/}
{rushCategory?.events.map((event, index) => (
- //
From 136a23d5831c9c772602eeccd1f544026d2c7718 Mon Sep 17 00:00:00 2001
From: William De Rocco <93288641+wderocco8@users.noreply.github.com>
Date: Fri, 2 Aug 2024 16:05:41 -0400
Subject: [PATCH 14/24] added cool border color/blur effect
---
src/app/dashboard/layout.tsx | 2 +-
src/app/globals.css | 46 ++++++++++++++++++++++++++
src/components/dashboard/EventCard.tsx | 2 +-
3 files changed, 48 insertions(+), 2 deletions(-)
diff --git a/src/app/dashboard/layout.tsx b/src/app/dashboard/layout.tsx
index 3bc3ff9..c897e32 100644
--- a/src/app/dashboard/layout.tsx
+++ b/src/app/dashboard/layout.tsx
@@ -1,4 +1,4 @@
-// import '../../globals.css'
+import '../globals.css'
import UserSessionProvider from '@/app/providers/userSessionProvider'
import NavSidebar from '@/components/NavSidebar'
import type { Metadata } from 'next'
diff --git a/src/app/globals.css b/src/app/globals.css
index b5c61c9..d631c70 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -1,3 +1,49 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
+
+/************************** glowing border effect ***************************/
+/* source: https://www.youtube.com/watch?v=ezP4kbOvs_E&list=PLZ6KBrFKcaDtqcqHv9NUCpul8a2B3F33F&index=6 */
+.card {
+ position: relative;
+}
+
+@property --angle {
+ syntax: "
";
+ initial-value: 0deg;
+ inherits: false;
+}
+
+.card:hover::after,
+.card:hover::before,
+.card:active::after,
+.card:active::before {
+ content: '';
+ position: absolute;
+ height: 101%;
+ width: 101%;
+ /* background-image: conic-gradient(from var(--angle), #bb4ec4, #f148c8,#2c12ed, #ffe900, #7fff00, #ffa500, #bb4ec4); */
+ background-image: conic-gradient(from var(--angle), #bb4ec4, #f148c8,#2c12ed, #ffa500, #bb4ec4);
+ top: 50%;
+ left: 50%;
+ translate: -50% -50%;
+ border-radius: 10px;
+ z-index: -1;
+ animation: 3s spin linear infinite;
+}
+
+.card:hover::before,
+.card:active::before {
+ filter: blur(1rem);
+ opacity: 0.7;
+}
+
+@keyframes spin{
+ from{
+ --angle: 0deg;
+ }
+ to{
+ --angle: 360deg;
+ }
+}
+/*****************************************************************************/
\ No newline at end of file
diff --git a/src/components/dashboard/EventCard.tsx b/src/components/dashboard/EventCard.tsx
index 922807d..50c27cf 100644
--- a/src/components/dashboard/EventCard.tsx
+++ b/src/components/dashboard/EventCard.tsx
@@ -39,7 +39,7 @@ export default function EventCard({
return (
(
Date: Fri, 2 Aug 2024 16:19:09 -0400
Subject: [PATCH 15/24] added badge to checkin page
---
src/app/checkin/[id]/page.tsx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/app/checkin/[id]/page.tsx b/src/app/checkin/[id]/page.tsx
index 1b7e93a..546f831 100644
--- a/src/app/checkin/[id]/page.tsx
+++ b/src/app/checkin/[id]/page.tsx
@@ -14,6 +14,7 @@ import {
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
+import { Badge } from "flowbite-react"
export default function Checkin({ params }: { params: { id: string } }) {
@@ -124,13 +125,10 @@ export default function Checkin({ params }: { params: { id: string } }) {
return (
- {/*
-
-
*/}
Hi, {session?.user?.name}!
Welcome to Phi Chi Theta, Zeta Chapter's Rush! We're excited to have you here.
-
Please enter your code to check-in to {event?.name}:
+
Please enter your code to check-in to {event?.name}:
setCode(e.target.value)} />
From 53f5daa938d35cd3e1f704bbdbeadc05e84a16ce Mon Sep 17 00:00:00 2001
From: William De Rocco <93288641+wderocco8@users.noreply.github.com>
Date: Fri, 2 Aug 2024 17:07:46 -0400
Subject: [PATCH 16/24] switched to Sidebar from flowbite
---
src/app/checkin/[id]/layout.tsx | 2 +-
src/app/dashboard/layout.tsx | 3 +-
src/app/favicon.ico | Bin 25931 -> 15406 bytes
src/app/layout.tsx | 2 +-
src/components/NavSidebar.tsx | 48 +++++++++++---------------------
5 files changed, 20 insertions(+), 35 deletions(-)
diff --git a/src/app/checkin/[id]/layout.tsx b/src/app/checkin/[id]/layout.tsx
index b48f510..030d961 100644
--- a/src/app/checkin/[id]/layout.tsx
+++ b/src/app/checkin/[id]/layout.tsx
@@ -5,7 +5,7 @@ import type { Metadata } from 'next'
export const metadata: Metadata = {
- title: 'Whyphi - Rush Checkin',
+ title: 'WhyPhi - Rush Checkin',
description: "PCT Zeta Chapter - Rush Checkin Page",
}
diff --git a/src/app/dashboard/layout.tsx b/src/app/dashboard/layout.tsx
index c897e32..c387bac 100644
--- a/src/app/dashboard/layout.tsx
+++ b/src/app/dashboard/layout.tsx
@@ -5,7 +5,7 @@ import type { Metadata } from 'next'
export const metadata: Metadata = {
- title: 'Whyphi - Rush Home',
+ title: 'WhyPhi - Rush Home',
description: "PCT Zeta Chapter - Rush Home Page",
}
@@ -17,6 +17,7 @@ export default function RootLayout({
return (
+ {/* */}
{children}
diff --git a/src/app/favicon.ico b/src/app/favicon.ico
index 718d6fea4835ec2d246af9800eddb7ffb276240c..820a41334969618853b7caa6d0a773d451d42c79 100644
GIT binary patch
literal 15406
zcmeHN*;AB95dTuiA7CEx&Qr=qpYoiyBxNcOIjd3?W92Fn
(rW4s`L039vrO4k
zBj0X%IrG4IivDz`@DJ3tQ3Ch9w>_MOS~_X8%S@*H3QGL`C>5N!Mdq3oy`L&%9=IU=
z^G-(5^yHMtfw3!ZrIEegBG0|{!B&y6@LY`QrstS1k9$J@kAid9D(^l$Jx!QX-~gUU
zo>zms2n5{}o}v=_ObDm9IbnaAiwwLC1PlZW1Xel%u&-{LgYEwWx!C@~{*RA2#U{e8
z!)HgPuF@Jlca6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