feat(domaincheck): support all TLDs with suggestion alternatives
Tessera CI/CD / Lint & Type Check (push) Successful in 1m8s
Tessera CI/CD / Tests (push) Successful in 1m13s
Tessera CI/CD / Build & Deploy (push) Successful in 2m39s

- Accept full domains (e.g. "example.xyz") not just labels
- Check the entered TLD as primary result
- Show .de, .com, .net, .org as alternative suggestions below
- Primary result highlighted with accent border
- Input without TLD still works (shows all 4 suggestions)
- Updated i18n placeholders and added "suggestions" label

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-25 14:54:30 +02:00
parent 95423497ad
commit 9f78580606
8 changed files with 95 additions and 134 deletions
@@ -1,16 +1,10 @@
/**
* Client-side action to check domain availability via the API.
*
* Calls POST /modules/domaincheck/check with the domain label.
* Auth cookie is forwarded via credentials: 'include'.
*/
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3001';
export interface DomainCheckResult {
tld: string;
fqdn: string;
status: 'available' | 'registered';
primary: boolean;
}
export interface DomainCheckResponse {
@@ -18,13 +12,6 @@ export interface DomainCheckResponse {
results: DomainCheckResult[];
}
/**
* Check domain availability across TLD variants.
*
* @param domain - Base domain label (e.g., "example")
* @returns Response with domain and results array
* @throws Error if the API call fails
*/
export async function checkDomainAction(
domain: string,
): Promise<DomainCheckResponse> {