Skip to content

Commit 5bab8fb

Browse files
committed
Fix client error
1 parent a2845dd commit 5bab8fb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/subdomain-form.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,13 @@ export function SubdomainForm() {
134134

135135
return (
136136
<form action={action} className="space-y-4">
137-
<SubdomainInput defaultValue={state.subdomain} />
137+
<SubdomainInput defaultValue={state?.subdomain} />
138138

139-
<IconPicker icon={icon} setIcon={setIcon} defaultValue={state.icon} />
139+
<IconPicker icon={icon} setIcon={setIcon} defaultValue={state?.icon} />
140140

141-
{state.error && <div className="text-sm text-red-500">{state.error}</div>}
141+
{state?.error && (
142+
<div className="text-sm text-red-500">{state.error}</div>
143+
)}
142144

143145
<Button type="submit" className="w-full" disabled={isPending || !icon}>
144146
{isPending ? 'Creating...' : 'Create Subdomain'}

0 commit comments

Comments
 (0)