11'use client' ;
22
33import {
4- ArrowRightIcon ,
54 ChartLineIcon ,
65 GlobeIcon ,
76 PlusIcon ,
87 SparkleIcon ,
98} from '@phosphor-icons/react' ;
109import Link from 'next/link' ;
1110import { FaviconImage } from '@/components/analytics/favicon-image' ;
12- import { Badge } from '@/components/ui/badge' ;
1311import { Button } from '@/components/ui/button' ;
14- import { Card , CardContent , CardHeader } from '@/components/ui/card' ;
12+ import { Card , CardContent } from '@/components/ui/card' ;
1513import { Skeleton } from '@/components/ui/skeleton' ;
1614import type { Organization } from '@/hooks/use-organizations' ;
1715import { trpc } from '@/lib/trpc' ;
@@ -23,26 +21,19 @@ interface WebsiteSettingsProps {
2321
2422function WebsiteLoadingSkeleton ( ) {
2523 return (
26- < div className = "grid select-none gap-4 sm:grid-cols-2 lg:grid-cols-3" >
24+ < div className = "grid gap-4 sm:grid-cols-2 lg:grid-cols-3" >
2725 { [ 1 , 2 , 3 ] . map ( ( num ) => (
28- < Card
29- className = "animate-pulse overflow-hidden"
30- key = { `website-skeleton-${ num } ` }
31- >
32- < CardHeader className = "pb-3" >
33- < div className = "flex items-center gap-3" >
34- < Skeleton className = "h-6 w-6 rounded" />
35- < div className = "min-w-0 flex-1 space-y-1" >
36- < Skeleton className = "h-4 w-24 rounded" />
37- < Skeleton className = "h-3 w-32 rounded" />
26+ < Card className = "group relative overflow-hidden" key = { `website-skeleton-${ num } ` } >
27+ < CardContent className = "p-4" >
28+ < div className = "space-y-3" >
29+ < div className = "flex items-start gap-3" >
30+ < Skeleton className = "h-10 w-10 flex-shrink-0 rounded-full" />
31+ < div className = "min-w-0 flex-1 space-y-1.5" >
32+ < Skeleton className = "h-3 w-32" />
33+ < Skeleton className = "h-3 w-24" />
34+ </ div >
3835 </ div >
3936 </ div >
40- </ CardHeader >
41- < CardContent className = "pt-0 pb-4" >
42- < div className = "flex items-center justify-between" >
43- < Skeleton className = "h-5 w-12 rounded-full" />
44- < Skeleton className = "h-4 w-4 rounded" />
45- </ div >
4637 </ CardContent >
4738 </ Card >
4839 ) ) }
@@ -126,8 +117,8 @@ export function WebsiteSettings({ organization }: WebsiteSettingsProps) {
126117 } ) ;
127118
128119 return (
129- < div className = "h-full p-6" >
130- < div className = "space-y-6" >
120+ < div className = "h-full p-4 sm:p- 6" >
121+ < div className = "space-y-4 sm:space-y- 6" >
131122 { /* Website count indicator */ }
132123 { ! isLoadingWebsites && websites && websites . length > 0 && (
133124 < div className = "flex items-center gap-2 rounded-lg border border-muted bg-muted/30 px-3 py-2 text-muted-foreground text-sm" >
@@ -165,49 +156,35 @@ export function WebsiteSettings({ organization }: WebsiteSettingsProps) {
165156 href = { `/websites/${ website . id } ` }
166157 key = { website . id }
167158 >
168- < Card className = "h-full overflow-hidden transition-all duration-300 ease-in-out group-hover:border-primary/50 group-hover:shadow-lg group-hover:shadow-primary/5" >
169- < CardHeader className = "pb-3" >
170- < div className = "flex items-center justify-between gap-2" >
171- < div className = "flex min-w-0 flex-1 items-center gap-3" >
159+ < Card className = "group relative cursor-pointer overflow-hidden transition-all duration-200 hover:border-border/60 hover:bg-muted/30" >
160+ < CardContent className = "p-4" >
161+ < div className = "space-y-3" >
162+ { /* Website Info */ }
163+ < div className = "flex items-start gap-3" >
172164 < FaviconImage
173165 altText = { `${ website . name } favicon` }
174- className = "flex-shrink-0 rounded"
166+ className = "h-10 w-10 flex-shrink-0 rounded border border-border/30 "
175167 domain = { website . domain }
176168 fallbackIcon = {
177- < div className = "rounded bg-primary/10 p-1 " >
169+ < div className = "flex h-10 w-10 items-center justify-center rounded border border-border/30 bg-accent " >
178170 < GlobeIcon
179- className = "h-4 w-4 text-primary "
180- size = { 16 }
171+ className = "h-5 w-5 text-muted-foreground "
172+ size = { 20 }
181173 weight = "duotone"
182174 />
183175 </ div >
184176 }
185- size = { 24 }
177+ size = { 40 }
186178 />
187179 < div className = "min-w-0 flex-1" >
188- < h4 className = "truncate font-semibold text-foreground text-sm transition-colors group-hover:text-primary " >
180+ < h3 className = "truncate font-semibold text-sm " >
189181 { website . name }
190- </ h4 >
182+ </ h3 >
191183 < p className = "truncate text-muted-foreground text-xs" >
192184 { website . domain }
193185 </ p >
194186 </ div >
195187 </ div >
196- < ArrowRightIcon
197- aria-hidden = "true"
198- className = "h-4 w-4 flex-shrink-0 text-muted-foreground transition-all duration-200 group-hover:translate-x-1 group-hover:text-primary"
199- weight = "fill"
200- />
201- </ div >
202- </ CardHeader >
203- < CardContent className = "pt-0 pb-4" >
204- < div className = "flex items-center justify-between" >
205- < Badge
206- className = "border-primary/20 bg-primary/10 text-primary"
207- variant = "secondary"
208- >
209- Active
210- </ Badge >
211188 </ div >
212189 </ CardContent >
213190 </ Card >
0 commit comments