feat(apps): registration step 5 pages in bull and bear

Add /onboarding/creator-profile and /onboarding/investor-profile to both
apps, with the group's loading skeleton. Each page renders its frame on the
server and its step only in the browser behind AuthGuard for its role, with
noindex. bull uses the mobile top bar and column; bear the desktop header,
with the creator's form card beside its live preview (AuthTemplate
`framed={false}`) and the investor in the 560 card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Amiram_se 2026-10-05 22:33:00 +04:00
parent 436695ae0b
commit a6e6eddc94
12 changed files with 216 additions and 10 deletions

View File

@ -0,0 +1,13 @@
import { SkeletonPreset } from '@lumina/island/organisms/skeleton-preset';
import { i18n } from '../../i18n';
import { AuthTemplate } from '../templates/auth-template';
/** Registration's last steps, before their frame arrives: the header, the card and a form step's shape. */
export default function OnboardingLoading() {
return (
<AuthTemplate width="wide">
<SkeletonPreset preset="form" delayed label={i18n.t('auth:loading')} />
</AuthTemplate>
);
}

View File

@ -0,0 +1,43 @@
import { AuthGuard } from '@lumina/market/app/guards/auth-guard';
import {
CreatorProfileStep,
CreatorProfileStepSkeleton,
} from '@lumina/market/app/screens/(onboarding)/onboarding/creator-profile/organisms/creator-profile-step';
import type { Metadata } from 'next';
import { Suspense } from 'react';
import { i18n } from '../../../../i18n';
import { AuthTemplate } from '../../../templates/auth-template';
export function generateMetadata(): Metadata {
return {
title: i18n.t('auth:register.profile.meta-title'),
robots: { index: false },
};
}
/**
* Registration step 5 for a creator, on the session: the form card beside its live preview. The
* frame renders on the server; the step only in the browser, behind the same-size skeleton.
*/
export default function CreatorProfilePage() {
const skeleton = (
<CreatorProfileStepSkeleton
layout="desktop"
label={i18n.t('auth:loading')}
/>
);
return (
<AuthTemplate framed={false}>
<AuthGuard role="creator" fallback={skeleton}>
<Suspense fallback={skeleton}>
<CreatorProfileStep
size="md"
layout="desktop"
supportPlacement="popover"
/>
</Suspense>
</AuthGuard>
</AuthTemplate>
);
}

View File

@ -0,0 +1,37 @@
import { SkeletonPreset } from '@lumina/island/organisms/skeleton-preset';
import { AuthGuard } from '@lumina/market/app/guards/auth-guard';
import { InvestorProfileStep } from '@lumina/market/app/screens/(onboarding)/onboarding/investor-profile/organisms/investor-profile-step';
import type { Metadata } from 'next';
import { i18n } from '../../../../i18n';
import { AuthTemplate } from '../../../templates/auth-template';
export function generateMetadata(): Metadata {
return {
title: i18n.t('auth:register.profile.meta-title'),
robots: { index: false },
};
}
/**
* Registration step 5 for an investor, optional, on the session, in the 560 card. The frame
* renders on the server; the step only in the browser, for the signed-in investor.
*/
export default function InvestorProfilePage() {
return (
<AuthTemplate width="wide">
<AuthGuard
role="investor"
fallback={
<SkeletonPreset
preset="form"
count={2}
label={i18n.t('auth:loading')}
/>
}
>
<InvestorProfileStep size="md" supportPlacement="popover" />
</AuthGuard>
</AuthTemplate>
);
}

View File

@ -11,11 +11,13 @@ import type { AuthTemplateProps } from './types';
/**
* Login and registration on desktop: the logged-out header (the brand and support) and each
* step in one centred card, its buttons inside the card under the fields. Browser back is the
* step in one centred card, its buttons inside the card under the fields. Registration step 5
* keeps the header, signed in: there is no nav until registration is complete. Browser back is the
* way back; there is no back button.
*/
export function AuthTemplate({
width = 'narrow',
framed = true,
children,
}: AuthTemplateProps) {
return (
@ -43,15 +45,19 @@ export function AuthTemplate({
justifyContent="justify-center"
className="px-4 pt-28 pb-16"
>
<Card
padding="none"
className={cn(
'w-full p-10',
width === 'wide' ? 'max-w-form' : 'max-w-checkout',
)}
>
{children}
</Card>
{framed ? (
<Card
padding="none"
className={cn(
'w-full p-10',
width === 'wide' ? 'max-w-form' : 'max-w-checkout',
)}
>
{children}
</Card>
) : (
children
)}
</FlexBox>
</FlexBox>
);

View File

@ -3,5 +3,10 @@ import type { ReactNode } from 'react';
export type AuthTemplateProps = {
/** narrow (480): the number and the code. wide (560): the account type and step 4. */
width?: 'narrow' | 'wide';
/**
* false: no card; the step draws its own, such as registration step 5's form card beside its
* live preview.
*/
framed?: boolean;
children: ReactNode;
};

View File

@ -0,0 +1,16 @@
import { SkeletonPreset } from '@lumina/island/organisms/skeleton-preset';
import { i18n } from '../../i18n';
import { AuthTopBar } from '../organisms/auth-top-bar';
import { AuthTemplate } from '../templates/auth-template';
/** Registration's last steps, before their frame arrives: the top bar and a form step's shape. */
export default function OnboardingLoading() {
return (
<AuthTemplate
header={<AuthTopBar title={i18n.t('auth:register.header')} />}
>
<SkeletonPreset preset="form" delayed label={i18n.t('auth:loading')} />
</AuthTemplate>
);
}

View File

@ -0,0 +1,46 @@
import { AuthGuard } from '@lumina/market/app/guards/auth-guard';
import {
CreatorProfileStep,
CreatorProfileStepSkeleton,
} from '@lumina/market/app/screens/(onboarding)/onboarding/creator-profile/organisms/creator-profile-step';
import type { Metadata } from 'next';
import { Suspense } from 'react';
import { i18n } from '../../../../i18n';
import { AuthTopBar } from '../../../organisms/auth-top-bar';
import { AuthTemplate } from '../../../templates/auth-template';
export function generateMetadata(): Metadata {
return {
title: i18n.t('auth:register.profile.meta-title'),
robots: { index: false },
};
}
/**
* Registration step 5 for a creator, on the session. The frame renders on the server; the step
* only in the browser, for the signed-in creator, behind the same-size skeleton.
*/
export default function CreatorProfilePage() {
const skeleton = (
<CreatorProfileStepSkeleton
layout="mobile"
label={i18n.t('auth:loading')}
/>
);
return (
<AuthTemplate
header={<AuthTopBar title={i18n.t('auth:register.header')} />}
>
<AuthGuard role="creator" fallback={skeleton}>
<Suspense fallback={skeleton}>
<CreatorProfileStep
size="lg"
layout="mobile"
supportPlacement="bottom"
/>
</Suspense>
</AuthGuard>
</AuthTemplate>
);
}

View File

@ -0,0 +1,40 @@
import { SkeletonPreset } from '@lumina/island/organisms/skeleton-preset';
import { AuthGuard } from '@lumina/market/app/guards/auth-guard';
import { InvestorProfileStep } from '@lumina/market/app/screens/(onboarding)/onboarding/investor-profile/organisms/investor-profile-step';
import type { Metadata } from 'next';
import { i18n } from '../../../../i18n';
import { AuthTopBar } from '../../../organisms/auth-top-bar';
import { AuthTemplate } from '../../../templates/auth-template';
export function generateMetadata(): Metadata {
return {
title: i18n.t('auth:register.profile.meta-title'),
robots: { index: false },
};
}
/**
* Registration step 5 for an investor, optional, on the session. The frame renders on the
* server; the step only in the browser, for the signed-in investor.
*/
export default function InvestorProfilePage() {
return (
<AuthTemplate
header={<AuthTopBar title={i18n.t('auth:register.header')} />}
>
<AuthGuard
role="investor"
fallback={
<SkeletonPreset
preset="form"
count={2}
label={i18n.t('auth:loading')}
/>
}
>
<InvestorProfileStep size="lg" supportPlacement="bottom" />
</AuthGuard>
</AuthTemplate>
);
}