Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 31 additions & 57 deletions app/page.jsx
Original file line number Diff line number Diff line change
@@ -1,63 +1,37 @@
import Link from 'next/link';
import { Card } from 'components/card';
import { ContextAlert } from 'components/context-alert';
import { Markdown } from 'components/markdown';
import { RandomQuote } from 'components/random-quote';
import { getNetlifyContext } from 'utils';

const contextExplainer = `
The card below is rendered on the server based on the value of \`process.env.CONTEXT\`
([docs](https://docs.netlify.com/configure-builds/environment-variables/#build-metadata)):
`;
import Link from "next/link";

const preDynamicContentExplainer = `
The card content below is fetched by the client-side from \`/quotes/random\` (see file \`app/quotes/random/route.js\`) with a different quote shown on each page load:
`;
export default function Page() {
return (
<div className="flex min-h-screen flex-col items-center justify-center px-6 text-center bg-white">

<h1 className="mb-4 text-3xl font-bold sm:text-4xl text-gray-900">
Análise Inteligente de Pele com IA
</h1>

const ctx = getNetlifyContext();
<p className="mb-6 max-w-xl text-lg text-gray-600">
Nossa tecnologia combina análise de imagem com perguntas sobre
tipo de pele e comportamento ao sol, criando uma trava de segurança
que corrige erros causados pela iluminação da foto e aumenta
significativamente a precisão do resultado.
</p>

export default function Page() {
return (
<div className="flex flex-col gap-12 sm:gap-16">
<section>
<ContextAlert className="mb-6" />
<h1 className="mb-4">Netlify Platform Starter – Next.js</h1>
<p className="mb-6 text-lg">
Deploy the latest version of Next.js — including Turbopack, React Compiler, and the new caching APIs
— on Netlify in seconds. No configuration or custom adapter required.
</p>
<Link href="https://docs.netlify.com/frameworks/next-js/overview/" className="btn btn-lg sm:min-w-64">
Read the Docs
</Link>
</section>
{!!ctx && (
<section className="flex flex-col gap-4">
<Markdown content={contextExplainer} />
<RuntimeContextCard />
</section>
)}
<section className="flex flex-col gap-4">
<Markdown content={preDynamicContentExplainer} />
<RandomQuote />
</section>
</div>
);
}
<p className="mb-8 max-w-xl text-base text-gray-500">
Diferente de outros apps, nossa IA entende quando a imagem engana o sensor,
evitando diagnósticos errados causados por luz azulada, sombras ou filtros.
</p>

<Link
href="#"
className="rounded-xl bg-black px-8 py-4 text-white transition hover:bg-gray-800"
>
Em breve – Teste sua pele
</Link>

<span className="mt-6 text-sm text-gray-400">
Tecnologia em desenvolvimento • Uso educacional
</span>

function RuntimeContextCard() {
const title = `Netlify Context: running in ${ctx} mode.`;
if (ctx === 'dev') {
return (
<Card title={title}>
<p>Next.js will rebuild any page you navigate to, including static pages.</p>
</Card>
);
} else {
const now = new Date().toISOString();
return (
<Card title={title}>
<p>This page was statically-generated at build time ({now}).</p>
</Card>
);
}
</div>
);
}