t3-code-android-nightly/.repos/alchemy-effect/examples/neon-website-nextjs/app/page.jsx
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00

40 lines
1.2 KiB
JavaScript

import { Card } from "./components/Card";
import { Counter } from "./components/Counter";
import { submitName } from "./actions";
import Image from "next/image";
// Server-rendered in the Neon Functions runtime on every request.
export const dynamic = "force-dynamic";
export const metadata = {
title: "Next.js on Neon",
};
export default async function Home({ searchParams }) {
const { submitted } = await searchParams;
return (
<main>
<h1 className="text-3xl font-bold">{process.env.GREETING ?? "Hello!"}</h1>
<Card
title="Styled with Tailwind CSS"
body="This card is a React component styled with Tailwind utilities."
/>
<Image
src="/logo.svg"
alt="Neon Website"
width={160}
height={48}
unoptimized
/>
<Counter />
<form action={submitName}>
<label htmlFor="name">Your name</label>
<input id="name" name="name" required maxLength={64} />
<button type="submit">Submit name</button>
</form>
{submitted && <p role="status">Submitted: {submitted}</p>}
<a href="/api/stream">Stream events</a>
<a href="/redirect">Follow redirect</a>
</main>
);
}