diff --git a/client/public/fire.png b/client/public/fire.png new file mode 100644 index 0000000..d1f64ad Binary files /dev/null and b/client/public/fire.png differ diff --git a/client/public/heart.png b/client/public/heart.png new file mode 100644 index 0000000..008f6ef Binary files /dev/null and b/client/public/heart.png differ diff --git a/client/src/pages/healthcheck.tsx b/client/src/pages/healthcheck.tsx new file mode 100644 index 0000000..9d98316 --- /dev/null +++ b/client/src/pages/healthcheck.tsx @@ -0,0 +1,26 @@ +import { useState } from "react"; + +import { usePings } from "@/hooks/pings"; +import { cn } from "@/lib/utils"; + +import { Button } from "../components/ui/button"; + +export default function Home() { + const [clicked, setClicked] = useState(false); + const { data, isLoading } = usePings({ + enabled: clicked, + }); + + return ( +
+

Test title

+

Test subtitle

+ +

+ Response from server: {data as string} +

+
+ ); +} diff --git a/client/src/pages/index.tsx b/client/src/pages/index.tsx index 9d98316..0d155f1 100644 --- a/client/src/pages/index.tsx +++ b/client/src/pages/index.tsx @@ -1,26 +1,276 @@ -import { useState } from "react"; +import { ChevronLeft, ChevronRight } from "lucide-react"; +import Image from "next/image"; +import Link from "next/link"; +import { useRouter } from "next/router"; +import { useRef,useState } from "react"; -import { usePings } from "@/hooks/pings"; -import { cn } from "@/lib/utils"; +import FeatureBox from "@/components/ui/featureBox"; +import { useEvent } from "@/hooks/useEvent"; import { Button } from "../components/ui/button"; -export default function Home() { - const [clicked, setClicked] = useState(false); - const { data, isLoading } = usePings({ - enabled: clicked, - }); +// function formatDateTime(dateString: string): string { +// try { +// const date = new Date(dateString); +// return new Intl.DateTimeFormat("en-AU", { +// year: "numeric", +// month: "long", +// day: "numeric", +// hour: "2-digit", +// minute: "2-digit", +// }).format(date); +// } catch { +// return dateString; +// } +// } + +export default function Landing() { + const btnList2 = [ + { name: "See more games by our members", link: "/" }, + { name: "See other cool stuff our members have created", link: "/" }, + ]; + + const router = useRouter(); + const { id } = router.query; + + const { + data: event, + // isPending, + // error, + // isError, + } = useEvent(router.isReady ? id : undefined); + + console.log("event", event); + + const upcomingEvents = [ + { + id: 1, + title: "Summer 2026 Game Jam", + time: "Monday 24th Oct 11:00am–4:00pm", + image: "/placeholder.png", + }, + { + id: 2, + title: "Godot Workshop", + time: "Thursday 2nd Nov 2:00–4:00pm", + image: "/placeholder.png", + }, + { + id: 3, + title: "World domination", + time: "Thursday 2nd Nov 2:00–4:00pm", + image: "/placeholder.png", + }, + ]; + + const gamesData = [ + { + id: 1, + title: "Cool Game", + description: "Cool game is a game about being cool.", + image: "/placeholder.png", + }, + { + id: 2, + title: "Cool Game 2", + description: "Cool game 2 is a game about being cool.", + image: "/placeholder.png", + }, + { + id: 3, + title: "Cool Game 3", + description: "Cool game 3 is a game about being cool.", + image: "/placeholder.png", + }, + ]; + + const VISIBLE_COUNT = 3; + const [currentIndex, setCurrentIndex] = useState(0); + const containerRef = useRef(null); + + const maxIndex = Math.max(upcomingEvents.length - VISIBLE_COUNT, 0); + const slideLeft = () => setCurrentIndex((prev) => Math.max(prev - 1, 0)); + const slideRight = () => + setCurrentIndex((prev) => Math.min(prev + 1, maxIndex)); return ( -
-

Test title

-

Test subtitle

- -

- Response from server: {data as string} -

+
+
+
+ {/* Title Row */} +
+
+

+ Upcoming Events +

+ + {/* Arrow controls */} +
+ + +
+
+
+ + See More + + + > + +
+
+ +
+
+
+ {upcomingEvents.map((event) => ( +
+
+ {event.title} +
+ +

+ {event.title} +

+ +

+ {event.time} +

+ +
+
+ ))} +
+
+
+
+
+ +
+
+
+
+ Placeholder +
Join our Discord
+
+
+ Placeholder +
Join our Discord
+
+
+ + +
+
+ +
+
+
+ {/* --- Title & Intro Text --- */} +
+

+ Featured Member Creations + +

+ +
+

+ Some of our favourite games made by our members +

+ +
+
+
+ + {/* --- Buttons Row --- */} +
+ {btnList2.map((item, i) => ( + + + + ))} +
+
+ + {/* --- Card Container --- */} +
+ {gamesData.map((game) => ( +
+
+ {game.title} +
+ +

{game.title}

+ +

{game.description}

+ +
+
+ ))} +
+
+ + + +
); }