diff --git a/app/not-found.tsx b/app/not-found.tsx index 3bdb1ba05..db60505a2 100644 --- a/app/not-found.tsx +++ b/app/not-found.tsx @@ -44,7 +44,9 @@ export default function NotFound() {

{subdomain ? `Create ${subdomain}` : `Go to ${rootDomain}`} diff --git a/app/subdomain-form.tsx b/app/subdomain-form.tsx index e26371ab1..f1d990314 100644 --- a/app/subdomain-form.tsx +++ b/app/subdomain-form.tsx @@ -22,6 +22,7 @@ import { } from '@/components/ui/emoji-picker'; import { createSubdomainAction } from '@/app/actions'; import { rootDomain } from '@/lib/utils'; +import { useSearchParams } from 'next/navigation'; type CreateState = { error?: string; @@ -132,9 +133,12 @@ export function SubdomainForm() { {} ); + const searchParams = useSearchParams(); + const subdomain = state?.subdomain ?? searchParams.get('subdomain') ?? ''; + return (
- +