diff --git a/apps/web/app/admin/cities/new/page.tsx b/apps/web/app/admin/cities/new/page.tsx index d148928..cf8a7b7 100644 --- a/apps/web/app/admin/cities/new/page.tsx +++ b/apps/web/app/admin/cities/new/page.tsx @@ -509,12 +509,13 @@ function ConfirmStep({ [], ); + const KNOWN_COUNTRIES = ["DE", "NL", "DK"]; const handleResultSelect = useCallback( (result: { name: string; countryCode: string } | null) => { if (!result) return; setName(result.name); setSlug(toSlug(result.name)); - setCountryCode(result.countryCode); + setCountryCode(KNOWN_COUNTRIES.includes(result.countryCode) ? result.countryCode : ""); }, [], ); @@ -562,20 +563,23 @@ function ConfirmStep({ -
+
- setCountryCode(e.target.value.toUpperCase())} + onChange={(e) => setCountryCode(e.target.value)} className="block w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-brand-500 focus:outline-none focus:ring-1 focus:ring-brand-500" - placeholder="DE" - /> + > + + + + + {!countryCode && (

- No transit scoring without a country code. + No transit scoring without a country.

)}