1- import LikeButton from "@/components/like-button" ;
2- import { getRedis } from "@/lib/redis" ;
3- import { incrementLikesAction } from "./actions" ;
41import {
52 codeExampleToJsx ,
63 dockerCommand ,
@@ -23,24 +20,22 @@ import { Terminal } from "lucide-react";
2320import Accordion from "@/components/accordion" ;
2421import { RiDiscordFill , RiGithubFill } from "@remixicon/react" ;
2522import Link from "next/link" ;
23+ import LikeWrapper from "@/components/like-wrapper" ;
2624
2725export default async function HomePage ( ) {
28- const redis = getRedis ( ) ;
29- const initialCount = Number ( await redis . get ( "demo:likes" ) ) || 0 ;
30-
3126 return (
3227 < main className = "border-x border-gray-700 min-h-screen mx-auto w-[90vw] max-w-4xl pt-[10vh]" >
3328 < hr className = "absolute left-0 right-0 border-gray-700" />
3429 < header className = "flex flex-col gap-4 items-center text-center justify-center h-[80vh]" >
35- < h1 className = "text-5xl font-bold leading-tight" >
30+ < h1 className = "text-5xl font-bold leading-tight px-4 " >
3631 Type-safe live updates < br />
3732 in minutes
3833 </ h1 >
39- < p className = "text-lg text-gray-500" >
34+ < p className = "text-lg text-gray-500 px-4 " >
4035 Zero-config SSE. Shared types. Simple client & server helpers .
4136 </ p >
4237
43- < LikeButton initialCount = { initialCount } onLike = { incrementLikesAction } />
38+ < LikeWrapper />
4439 </ header >
4540
4641 < hr className = "absolute left-0 right-0 border-gray-700" />
@@ -97,7 +92,7 @@ export default async function HomePage() {
9792 </ div >
9893 </ section >
9994
100- < h2 className = "text-4xl font-bold mt-32 mb-8 w-full text-center" >
95+ < h2 className = "text-4xl font-bold mt-32 mb-8 w-full text-center px-4 " >
10196 Let’s get started!
10297 </ h2 >
10398 < hr className = "absolute left-0 right-0 border-gray-700" />
@@ -159,19 +154,21 @@ export default async function HomePage() {
159154 </ div >
160155
161156 < div className = "px-4 py-8 flex flex-col gap-4 border-b border-gray-700" >
162- < h3 className = "text-xl font-mono text-gray-300" > 4. You’re done</ h3 >
157+ < h3 className = "text-xl font-mono text-gray-300" >
158+ 4. You’re done
159+ </ h3 >
163160 < p className = "text-gray-400" >
164161 Perfect! You’re now free to add more events to your app.
165162 </ p >
166163 < p className = "text-gray-400" >
167164 You may want more customizations, like authentication or topics.
168165 < br />
169- Follow the link below to learn more.
166+ Follow the < code > Deep dive! </ code > section below to learn more.
170167 </ p >
171168 </ div >
172169 </ section >
173170
174- < h2 className = "text-4xl font-bold mt-32 mb-8 w-full text-center" >
171+ < h2 className = "text-4xl font-bold mt-32 mb-8 w-full text-center px-4 " >
175172 Deep dive!
176173 </ h2 >
177174 < hr className = "absolute left-0 right-0 border-gray-700" />
@@ -246,27 +243,27 @@ export default async function HomePage() {
246243 < hr className = "w-full border-gray-700" />
247244 </ section >
248245
249- < h2 className = "text-4xl font-bold mt-32 mb-8 w-full text-center" >
246+ < h2 className = "text-4xl font-bold mt-32 mb-8 w-full text-center px-4 " >
250247 Missing something?
251248 </ h2 >
252249 < hr className = "absolute left-0 right-0 border-gray-700" />
253250
254- < section className = "flex flex-col items-center justify-center pt-24 pb-36 gap-4" >
251+ < section className = "flex flex-col items-center justify-center pt-24 pb-36 gap-4 px-4 " >
255252 < p className = "text-gray-400 text-center max-w-2xl" >
256253 If you’re missing something,
257254 < br />
258255 feel free to open an issue on the GitHub repository or discuss it on
259256 the Discord server.
260257 </ p >
261- < div className = "flex items-center gap-4" >
258+ < div className = "flex items-center gap-4 flex-wrap justify-center " >
262259 < Link
263260 href = "https://github.com/impulse-studio/realtime"
264261 target = "_blank"
265262 className = "bg-white text-black px-6 py-3 rounded-2xl flex items-center gap-2 font-medium hover:bg-gray-200 relative cursor-pointer"
266263 >
267264 < div className = "absolute left-0.5 right-0.5 bottom-0.5 rounded-b-2xl bg-gradient-to-t pointer-events-none h-4 from-black to-transparent opacity-20" />
268265 < RiGithubFill />
269- Open in GitHub
266+ < span className = "text-nowrap" > Open in GitHub</ span >
270267 </ Link >
271268 < Link
272269 href = "https://discord.gg/bBWXedJwWN"
@@ -275,14 +272,14 @@ export default async function HomePage() {
275272 >
276273 < div className = "absolute left-0.5 right-0.5 bottom-0.5 rounded-b-2xl bg-gradient-to-t pointer-events-none h-4 from-black to-transparent opacity-20" />
277274 < RiDiscordFill />
278- Open in Discord
275+ < span className = "text-nowrap" > Open in Discord</ span >
279276 </ Link >
280277 </ div >
281278 </ section >
282279
283280 < hr className = "absolute left-0 right-0 border-gray-700" />
284- < footer className = "flex items-center p-8 gap-4" >
285- < span className = "text-gray-400 me-auto " >
281+ < footer className = "flex items-center p-8 gap-4 justify-between flex-col sm:flex-row " >
282+ < span className = "text-gray-400" >
286283 Made with ❤️ by{ " " }
287284 < Link
288285 href = "https://impulselab.ai"
@@ -293,34 +290,36 @@ export default async function HomePage() {
293290 </ Link >
294291 </ span >
295292
296- < Link
297- href = "https://github.com/impulse-studio/realtime"
298- target = "_blank"
299- className = "text-amber-400 hover:text-amber-600"
300- >
301- GitHub
302- </ Link >
303- < Link
304- href = "https://discord.gg/bBWXedJwWN"
305- target = "_blank"
306- className = "text-amber-400 hover:text-amber-600"
307- >
308- Discord
309- </ Link >
310- < Link
311- href = "https://x.com/impulselab_ai"
312- target = "_blank"
313- className = "text-amber-400 hover:text-amber-600"
314- >
315- X
316- </ Link >
317- < Link
318- href = "https://linkedin.com/company/impulselab"
319- target = "_blank"
320- className = "text-amber-400 hover:text-amber-600"
321- >
322- LinkedIn
323- </ Link >
293+ < div className = "flex items-center gap-4 flex-wrap justify-center" >
294+ < Link
295+ href = "https://github.com/impulse-studio/realtime"
296+ target = "_blank"
297+ className = "text-amber-400 hover:text-amber-600"
298+ >
299+ GitHub
300+ </ Link >
301+ < Link
302+ href = "https://discord.gg/bBWXedJwWN"
303+ target = "_blank"
304+ className = "text-amber-400 hover:text-amber-600"
305+ >
306+ Discord
307+ </ Link >
308+ < Link
309+ href = "https://x.com/impulselab_ai"
310+ target = "_blank"
311+ className = "text-amber-400 hover:text-amber-600"
312+ >
313+ X
314+ </ Link >
315+ < Link
316+ href = "https://linkedin.com/company/impulselab"
317+ target = "_blank"
318+ className = "text-amber-400 hover:text-amber-600"
319+ >
320+ LinkedIn
321+ </ Link >
322+ </ div >
324323 </ footer >
325324 </ main >
326325 ) ;
0 commit comments