diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx index f622af5..5ae62e3 100644 --- a/src/app/not-found.tsx +++ b/src/app/not-found.tsx @@ -4,28 +4,26 @@ import Home from "@/public/frame/404homeframe.svg"; const NotFound = () => { return ( -
-
-
-
404
-
-
PAGE NOT FOUND
-

- It seems you've ventured into uncharted space. The page you're - seeking is hidden in the outer rim or lost in hyperspace. But fear - not, young Padawan! Use the Force (or the navigation menu) to find - your way back to the galaxy you know and love. May the Force be with - you on your journey! -

-
- - Back To Home - +
+
+
404
+
+
PAGE NOT FOUND
+

+ It seems you've ventured into uncharted space. The page you're seeking + is hidden in the outer rim or lost in hyperspace. But fear not, young + Padawan! Use the Force (or the navigation menu) to find your way back + to the galaxy you know and love. May the Force be with you on your + journey! +

+ + Back To Home +
); }; diff --git a/src/components/Button.tsx b/src/components/Button.tsx index e40f559..ca07112 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -1,11 +1,16 @@ import Link from "next/link"; - +import frame from "@/public/frame/learnframe.svg"; +import Image from "next/image"; const Button = ({ title, link }: { title: string; link: string }) => { return ( - +
- button frame - + button frame + {title}
diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 3616cec..cde5a6a 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -7,9 +7,9 @@ import Logo from "@/public/swIcon.svg"; const Footer = () => { return (
-
+ Logo -
+
{socialMedia.map((link, index) => ( diff --git a/src/components/Join.tsx b/src/components/Join.tsx index e3c83df..3bb9f4c 100644 --- a/src/components/Join.tsx +++ b/src/components/Join.tsx @@ -96,7 +96,7 @@ const Join = () => { whileTap={{ scale: 0.9 }} transition={{ type: "spring", stiffness: 400, damping: 10 }} > - + icon { href="/join" className="flex items-center justify-center" onClick={() => setIsOpen(false)} + target="_blank" > navframe

diff --git a/src/components/What.tsx b/src/components/What.tsx index e09da93..0cf78e9 100644 --- a/src/components/What.tsx +++ b/src/components/What.tsx @@ -32,22 +32,22 @@ const fadeIn = { }, }; -const whatAnimation = { - hidden: { - opacity: 0, - scale: 0, - x: -500, - }, - visible: { - opacity: 1, - scale: 1, - x: 0, - }, -}; +// const whatAnimation = { +// hidden: { +// opacity: 0, +// scale: 0, +// x: -500, +// }, +// visible: { +// opacity: 1, +// scale: 1, +// x: 0, +// }, +// }; const What = () => { return ( -

+
{
- planet + planet
diff --git a/src/components/about/About.tsx b/src/components/about/About.tsx index 7d1f140..a832419 100644 --- a/src/components/about/About.tsx +++ b/src/components/about/About.tsx @@ -34,7 +34,7 @@ const About = ({ title }: { title: string }) => { /> { + const [filterId, setFilterId] = useState("upcoming"); const { isFetching, isError, data, error } = useQuery({ queryKey: ["Events"], queryFn: fetchEvents, @@ -20,38 +32,46 @@ const Events = () => { return Error: {error.message}; } - type items = { - id: string; - summary: string; - start: { - dateTime: string; - }; - location: string; - }; - const logo = [logo1, logo2, logo3]; + const filteredEvents = data.items.filter((event: items) => { + const eventDate = new Date(event.start.dateTime); + const now = new Date(); + + return filterId === "upcoming" ? eventDate >= now : eventDate < now; + }); + + const handleFilterChange = (id: string) => { + setFilterId(id); + }; return ( -
- -
- {data.items.slice(0, 6).map((element: items, index: number) => ( -
- +
+ +
+ {filteredEvents.length > 0 ? ( + filteredEvents.slice(0, 6).map((element: items, index: number) => ( +
+ +
+ )) + ) : ( +
+ No {filterId === "upcoming" ? "upcoming" : "past"} events available. + Check back later!
- ))} + )}
); diff --git a/src/components/calendar/EventCard.tsx b/src/components/calendar/EventCard.tsx index ca95964..2f90854 100644 --- a/src/components/calendar/EventCard.tsx +++ b/src/components/calendar/EventCard.tsx @@ -14,7 +14,7 @@ const EventCard = ({ logo: string; }) => { return ( -
+
{name} @@ -24,7 +24,7 @@ const EventCard = ({ Logo
{date}
{time}
diff --git a/src/components/calendar/Filter.tsx b/src/components/calendar/Filter.tsx index 239fc5c..8361378 100644 --- a/src/components/calendar/Filter.tsx +++ b/src/components/calendar/Filter.tsx @@ -9,11 +9,11 @@ const Filter = ({ onChange, }: { filters: Array; - onChange: (filter: Background) => void; + onChange: (filter: string) => void; }) => { const [selectedFilter, setSelectedFilter] = useState(filters[0]); const handleClick = (filter: Background) => { - onChange(filter); + onChange(filter.id); setSelectedFilter(filter); if (filter == filters[1]) { if (filter.Image == frame) { diff --git a/src/components/calendar/FilterCard.tsx b/src/components/calendar/FilterCard.tsx index adc318e..571de20 100644 --- a/src/components/calendar/FilterCard.tsx +++ b/src/components/calendar/FilterCard.tsx @@ -10,8 +10,12 @@ const FilterCard = ({ }) => { return (
- {`Image - + {`Image + {Message}
diff --git a/src/components/calendar/WrappedEvents.tsx b/src/components/calendar/WrappedEvents.tsx index df17a26..f1316bb 100644 --- a/src/components/calendar/WrappedEvents.tsx +++ b/src/components/calendar/WrappedEvents.tsx @@ -1,25 +1,25 @@ -"use client"; -//import { Component } from "Component, useState"; -//import Event from "./Event" -import { useState } from "react"; -import Filter from "./Filter"; -import { FILTERS } from "@/data/filters"; -import { Background } from "@/data/Background"; +// "use client"; +// //import { Component } from "Component, useState"; +// //import Event from "./Event" +// import { useState } from "react"; +// import Filter from "./Filter"; +// import { FILTERS } from "@/data/filters"; +// import { Background } from "@/data/Background"; -const Wrapped = () => { - const [component, setComponent] = useState(FILTERS[0]); +// const Wrapped = () => { +// const [component, setComponent] = useState(FILTERS[0]); - const handleFilterChange = (component: Background) => { - setComponent(component); - }; +// const handleFilterChange = (component: Background) => { +// setComponent(component); +// }; - return ( -
- - {component === FILTERS[0] && "no upcoming events" /**/} - {component === FILTERS[1] && "no past events" /**/} -
- ); -}; +// return ( +//
+// +// {component === FILTERS[0] && "no upcoming events" /**/} +// {component === FILTERS[1] && "no past events" /**/} +//
+// ); +// }; -export default Wrapped; +// export default Wrapped; diff --git a/src/data/Background.ts b/src/data/Background.ts index b637343..75347b3 100644 --- a/src/data/Background.ts +++ b/src/data/Background.ts @@ -1,6 +1,7 @@ import { StaticImageData } from "next/image"; -export interface Background { +export type Background = { + id: string; Image: StaticImageData; Message: string; -} +}; diff --git a/src/data/filters.ts b/src/data/filters.ts index bfaa429..985267a 100644 --- a/src/data/filters.ts +++ b/src/data/filters.ts @@ -1,12 +1,21 @@ import frame from "@/public/frame/pastevents1.svg"; import frame2 from "@/public/frame/upcomingevents.svg"; +import { StaticImageData } from "next/image"; -export const FILTERS = [ +export type Background = { + id: string; + Image: StaticImageData; + Message: string; +}; + +export const FILTERS: Background[] = [ { + id: "upcoming", Image: frame2, Message: "UPCOMING EVENTS", }, { + id: "past", Image: frame, Message: "PAST EVENTS", },