From 0947146b591ce6bc1c8abc7cb6c2b9eaf754d95e Mon Sep 17 00:00:00 2001 From: josh <144584931+dancer@users.noreply.github.com> Date: Wed, 10 Sep 2025 20:25:12 +0100 Subject: [PATCH] rm: domain check (#1190) --- components/domain-checker.tsx | 182 ---------------------------------- 1 file changed, 182 deletions(-) delete mode 100644 components/domain-checker.tsx diff --git a/components/domain-checker.tsx b/components/domain-checker.tsx deleted file mode 100644 index fb28880..0000000 --- a/components/domain-checker.tsx +++ /dev/null @@ -1,182 +0,0 @@ -'use client'; - -import { useState, useEffect } from 'react'; -import { CheckCircle2, XCircle, AlertCircle, Loader2, Globe, ExternalLink } from 'lucide-react'; -import { cn } from '@/lib/utils'; -import { Button } from '@/components/ui/button'; -import { motion, AnimatePresence } from 'framer-motion'; - -interface DomainResult { - domain: string; - available: boolean; - error?: string; -} - -interface DomainCheckerProps { - results?: DomainResult[]; - loading?: boolean; -} - -export function DomainChecker({ results = [], loading = false }: DomainCheckerProps) { - const [animatedResults, setAnimatedResults] = useState([]); - - useEffect(() => { - if (results.length > 0) { - setAnimatedResults([]); - const timer = setTimeout(() => { - results.forEach((result, index) => { - setTimeout(() => { - setAnimatedResults(prev => [...prev, result]); - }, index * 100); - }); - }, 100); - return () => clearTimeout(timer); - } - }, [results]); - - if (loading) { - return ( -
-
- -

Checking domain availability...

-
-
- ); - } - - if (results.length === 0) { - return null; - } - - const availableCount = results.filter(r => r.available).length; - const takenCount = results.filter(r => !r.available && !r.error).length; - - return ( -
-
- -

Domain Availability Check

-
- - {availableCount > 0 || takenCount > 0 ? ( -
-
-
- - {availableCount} available - -
-
-
- - {takenCount} taken - -
-
- ) : null} - -
- - {animatedResults.map((result, index) => ( - - - - ))} - -
-
- ); -} - -function DomainCard({ result }: { result: DomainResult }) { - const [isHovered, setIsHovered] = useState(false); - - if (result.error) { - return ( -
-
-
- -
-

{result.domain}

-

{result.error}

-
-
-
-
- ); - } - - const isAvailable = result.available; - - return ( -
setIsHovered(true)} - onMouseLeave={() => setIsHovered(false)} - > -
-
-
- {isAvailable ? ( - - ) : ( - - )} -
-

{result.domain}

-

- {isAvailable ? "Available for registration" : "Already registered"} -

-
-
- - {isAvailable && ( - - - - )} -
-
- - {isAvailable && ( - - )} -
- ); -} \ No newline at end of file