Spaces:
Running
Running
File size: 1,264 Bytes
d2a5dad f70bb71 d2a5dad 3321c18 f70bb71 e45f8c3 f70bb71 d2a5dad f70bb71 d2a5dad f70bb71 e45f8c3 f70bb71 d2a5dad f70bb71 d2a5dad |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
import Image from "next/image";
import CardsSvg from "@/images/cards.svg";
import { fetchSpaceRandomly } from "@/utils/network";
import { Shuffler } from "@/components/shuffler";
export default async function Home() {
const space = await fetchSpaceRandomly();
const nextSpace = await fetchSpaceRandomly();
return (
<main className="flex min-h-screen flex-col items-center justify-start lg:justify-start p-8 pt-16 lg:p-24 lg:pt-44">
<div className="w-full max-w-xl mx-auto grid gap-16 lg:gap-24 grid-cols-1">
<header className="grid grid-cols-1 gap-5">
<h1 className="relative font-sans text-center text-4xl lg:text-7xl font-extrabold max-w-max mx-auto text-transparent bg-clip-text bg-flashy">
Space Shuffler
<Image
src={CardsSvg}
alt="Cards"
width={70}
height={70}
className="w-10 lg:w-14 absolute -right-9 lg:-right-12 -top-5 lg:-top-6 -rotate-6"
/>
</h1>
<h2 className="font-serif text-white/60 text-lg lg:text-2xl text-center">
Find hidden gems from 180k Spaces
</h2>
</header>
<Shuffler space={space} nextSpace={nextSpace} />
</div>
</main>
);
}
|