The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import Image from "next/image"; |
| 2 | import { submitName } from "./actions"; |
| 3 | import { Card } from "./components/Card"; |
| 4 | import { Counter } from "./components/Counter"; |
| 5 | |
| 6 | // Server-rendered in the Neon Functions runtime on every request. |
| 7 | export const dynamic = "force-dynamic"; |
| 8 | |
| 9 | export const metadata = { |
| 10 | title: "Next.js on Neon", |
| 11 | }; |
| 12 | |
| 13 | export default async function Home({ searchParams }) { |
| 14 | const { submitted } = await searchParams; |
| 15 | return ( |
| 16 | <main> |
| 17 | <h1 className="text-3xl font-bold">{process.env.GREETING ?? "Hello!"}</h1> |
| 18 | <Card |
| 19 | title="Styled with Tailwind CSS" |
| 20 | body="This card is a React component styled with Tailwind utilities." |
| 21 | /> |
| 22 | <Image src="/logo.svg" alt="Neon Website" width={160} height={48} unoptimized /> |
| 23 | <Counter /> |
| 24 | <form action={submitName}> |
| 25 | <label htmlFor="name">Your name</label> |
| 26 | <input id="name" name="name" required maxLength={64} /> |
| 27 | <button type="submit">Submit name</button> |
| 28 | </form> |
| 29 | {submitted && <p role="status">Submitted: {submitted}</p>} |
| 30 | <a href="/api/stream">Stream events</a> |
| 31 | <a href="/redirect">Follow redirect</a> |
| 32 | </main> |
| 33 | ); |
| 34 | } |