@@ -6,11 +6,21 @@ import {
66 EventHighlightCard ,
77 eventHighlightCardType ,
88} from "@/components/ui/eventHighlightCard" ;
9- import { placeholderEvents , placeholderGames } from "@/placeholderData" ;
9+ import { UiEvent , useEvents } from "@/hooks/useEvents" ;
10+ import { placeholderGames } from "@/placeholderData" ;
1011
1112import { Button } from "../components/ui/button" ;
1213
1314export default function Landing ( ) {
15+ const { data, isPending, isError } = useEvents ( {
16+ type : "upcoming" ,
17+ pageSize : 100 ,
18+ } ) ;
19+ // TODO: remove this after testing
20+ console . log ( "data =" , data ) ;
21+
22+ const events : UiEvent [ ] | undefined = data ?. items ;
23+
1424 const gameLogoImages = [
1525 { url : "/godot.png" , alt : "Godot Logo" , position : "start" } ,
1626 { url : "/unity-logo.png" , alt : "Unity Logo" , position : "end" } ,
@@ -137,7 +147,7 @@ export default function Landing() {
137147 </ section >
138148
139149 < section className = "bg-background px-10 py-20" >
140- < EventCarousel items = { placeholderEvents } />
150+ { ! isPending && ! isError && < EventCarousel items = { events ?? [ ] } /> }
141151 </ section >
142152 { /* Leaving commented out until styling/design is confirmed. */ }
143153 { /* <section className="bg-background px-4 py-10 md:px-10">
@@ -146,7 +156,7 @@ export default function Landing() {
146156 title="So... How do I get involved?"
147157 text="The easiest way to get involved is to come along to one of our events!"
148158 />
149- </div>
159+ </div>1
150160 </section> */ }
151161
152162 < section className = "relative w-full overflow-hidden bg-dark_3 px-6 py-20 lg:px-12" >
0 commit comments