Template
Every page was importing Header and Footer and repeating the same store name, logo, copyright and nav links. Hoisting both into the root layout renders them once, and a new config/site.ts holds the values they shared. The body becomes a flex column so the footer sits at the bottom of short pages. not-found and error now render inside that chrome, so their full-viewport centering drops to 60vh. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D1vsTA4MX6qFd7nqSAKtdV
34 lines
938 B
TypeScript
34 lines
938 B
TypeScript
import AccountForm from '@/components/shopify/account-form';
|
|
|
|
export const metadata = { title: 'Activate your account — Shop' };
|
|
|
|
// Shopify's emailed activation link is /account/activate/{id}/{token}.
|
|
export default async function Page({
|
|
params,
|
|
}: {
|
|
params: Promise<{ id: string; token: string }>;
|
|
}) {
|
|
const { id, token } = await params;
|
|
|
|
return (
|
|
<main className="max-w-screen-2xl mx-auto w-full px-8 py-16">
|
|
<AccountForm
|
|
title="Activate your account"
|
|
description="Choose a password to finish setting up your account."
|
|
fields={[
|
|
{
|
|
name: 'password',
|
|
label: 'Password',
|
|
type: 'password',
|
|
autoComplete: 'new-password',
|
|
},
|
|
]}
|
|
submitLabel="Activate account"
|
|
endpoint="/api/account/activate"
|
|
extraPayload={{ id, activationToken: token }}
|
|
redirectTo="/account"
|
|
/>
|
|
</main>
|
|
);
|
|
}
|