feat: build landing page with hero, latest games, and donation CTA
Add GameCard shared component, HeroSection with framer-motion animations, LatestGames grid section, and DonationCTA banner. Wire up the home page to fetch games from Strapi and render all landing page sections. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,28 @@
|
||||
export default function HomePage() {
|
||||
import { getGames } from "@/lib/api";
|
||||
import { HeroSection } from "@/components/home/HeroSection";
|
||||
import { LatestGames } from "@/components/home/LatestGames";
|
||||
import { DonationCTA } from "@/components/home/DonationCTA";
|
||||
|
||||
export default async function HomePage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>;
|
||||
}) {
|
||||
const { locale } = await params;
|
||||
|
||||
let games: any[] = [];
|
||||
try {
|
||||
const res = await getGames(locale);
|
||||
games = res.data;
|
||||
} catch {
|
||||
// Strapi not running yet — render page without games
|
||||
}
|
||||
|
||||
return (
|
||||
<main>
|
||||
<h1>Project Afterlife</h1>
|
||||
</main>
|
||||
<>
|
||||
<HeroSection />
|
||||
<LatestGames games={games} locale={locale} />
|
||||
<DonationCTA />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user