website refactor
This commit is contained in:
@@ -1,23 +1,17 @@
|
||||
/**
|
||||
* Signup View Data Builder
|
||||
*
|
||||
*
|
||||
* Transforms SignupPageDTO into ViewData for the signup template.
|
||||
* Deterministic, side-effect free, no business logic.
|
||||
*/
|
||||
|
||||
import { SignupPageDTO } from '@/lib/services/auth/types/SignupPageDTO';
|
||||
|
||||
export interface SignupViewData {
|
||||
returnTo: string;
|
||||
formState: any; // Will be managed by client component
|
||||
isSubmitting: boolean;
|
||||
submitError?: string;
|
||||
}
|
||||
import { SignupViewData } from './types/SignupViewData';
|
||||
|
||||
export class SignupViewDataBuilder {
|
||||
static build(data: SignupPageDTO): SignupViewData {
|
||||
static build(apiDto: SignupPageDTO): SignupViewData {
|
||||
return {
|
||||
returnTo: data.returnTo,
|
||||
returnTo: apiDto.returnTo,
|
||||
formState: {
|
||||
fields: {
|
||||
firstName: { value: '', error: undefined, touched: false, validating: false },
|
||||
|
||||
Reference in New Issue
Block a user