mirror of
https://github.com/hanzo-apps/hanzo.ai.git
synced 2026-10-30 14:58:08 +00:00
Try Hanzo opens /signup directly instead of /chat bouncing a stranger there, which cost a whole page load on a phone (13 s throttled). /login no longer sends a new address to /signup: both pages send the link at once and make the account once the code proves the address, so the person stays on the page they chose. /login, /signup and /auth/callback preconnect to api.hanzo.ai from the head, so the methods read, the token exchange and the discovery a provider press needs start on a warm connection. A member at /login is marked before first paint (the app's BOOT under data-member), the form stays off screen while the page moves them on, and the panel asks IAM for no sign-in methods it would never draw. The callback starts the bind and the standing read together instead of one after the other.
29 lines
933 B
TypeScript
29 lines
933 B
TypeScript
import type { Metadata } from 'next'
|
|
import { pageMeta } from '@/lib/page-meta'
|
|
import { EARLY, HOLD } from '@/lib/auth/sale'
|
|
import { warm } from '@/lib/auth/warm'
|
|
|
|
// The page is 'use client', so its title lives here. Whether it is indexed is
|
|
// lib/publish's to say, and it says so.
|
|
export const metadata: Metadata = pageMeta({
|
|
title: 'Create your account',
|
|
description: 'Create a Hanzo account with your email or a provider.',
|
|
path: '/signup',
|
|
})
|
|
|
|
/**
|
|
* A checkout's sign-in is settled before the page paints (lib/auth/sale
|
|
* `EARLY`): the hero is held back until the page draws the checkout's step, and
|
|
* /login for a checkout with a coupon moves to /signup.
|
|
*/
|
|
export default function Layout({ children }: { children: React.ReactNode }) {
|
|
warm()
|
|
return (
|
|
<>
|
|
<style dangerouslySetInnerHTML={{ __html: HOLD }} />
|
|
<script dangerouslySetInnerHTML={{ __html: EARLY }} />
|
|
{children}
|
|
</>
|
|
)
|
|
}
|