Merge branch 'codex/fix-invite-activation'
This commit is contained in:
@@ -53,8 +53,6 @@ export type InviteState = {
|
||||
};
|
||||
};
|
||||
|
||||
export const initialInviteState: InviteState = { attempt: 0 };
|
||||
|
||||
function echoCheckboxValues(formData: FormData): InviteState["values"] {
|
||||
return {
|
||||
acceptPrivacyPolicy: formData.get("acceptPrivacyPolicy") === "on",
|
||||
|
||||
@@ -6,7 +6,9 @@ import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { Checkbox } from "@/components/ui/checkbox";
|
||||
import { acceptInviteAction, initialInviteState } from "./actions";
|
||||
import { acceptInviteAction, type InviteState } from "./actions";
|
||||
|
||||
const initialInviteState: InviteState = { attempt: 0 };
|
||||
|
||||
// =====================================================================
|
||||
// InviteForm · Client Component
|
||||
|
||||
@@ -70,8 +70,6 @@ export type OnboardingState = {
|
||||
};
|
||||
};
|
||||
|
||||
export const initialOnboardingState: OnboardingState = { attempt: 0 };
|
||||
|
||||
function echoValues(formData: FormData): OnboardingState["values"] {
|
||||
const min = formData.get("notdienstMinPerChildPerMonth");
|
||||
return {
|
||||
|
||||
@@ -7,10 +7,9 @@ import { Checkbox } from "@/components/ui/checkbox";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
|
||||
import {
|
||||
completeOnboardingAction,
|
||||
initialOnboardingState,
|
||||
} from "./actions";
|
||||
import { completeOnboardingAction, type OnboardingState } from "./actions";
|
||||
|
||||
const initialOnboardingState: OnboardingState = { attempt: 0 };
|
||||
|
||||
export function OnboardingForm() {
|
||||
const [state, formAction, pending] = useActionState(
|
||||
|
||||
@@ -52,8 +52,6 @@ export type RegisterState = {
|
||||
};
|
||||
};
|
||||
|
||||
export const initialRegisterState: RegisterState = { attempt: 0 };
|
||||
|
||||
function echoValues(formData: FormData): RegisterState["values"] {
|
||||
return {
|
||||
firstName: String(formData.get("firstName") ?? ""),
|
||||
|
||||
@@ -7,7 +7,9 @@ import { Checkbox } from "@/components/ui/checkbox";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
|
||||
import { initialRegisterState, registerAction } from "./actions";
|
||||
import { registerAction, type RegisterState } from "./actions";
|
||||
|
||||
const initialRegisterState: RegisterState = { attempt: 0 };
|
||||
|
||||
export function RegisterForm() {
|
||||
const [state, formAction, pending] = useActionState(
|
||||
|
||||
Reference in New Issue
Block a user