fix(03): strip TLD from domaincheck input before sending to API

Users naturally type full domains (e.g. "google.de") but the API
validates DNS labels only. Extract the label part before the first
dot to prevent 400 validation errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-20 09:37:39 +02:00
parent 5708127dbb
commit 576e311262
@@ -20,9 +20,9 @@ export function DomainInput({ onSubmit, isLoading }: DomainInputProps) {
const handleSubmit = (e: FormEvent) => { const handleSubmit = (e: FormEvent) => {
e.preventDefault(); e.preventDefault();
const trimmed = domain.trim(); const label = domain.trim().split('.')[0];
if (trimmed) { if (label) {
onSubmit(trimmed); onSubmit(label);
} }
}; };