Skip to content

Commit 873a392

Browse files
committed
fix: the hierarchy of it
1 parent c1d7484 commit 873a392

File tree

1 file changed

+33
-27
lines changed

1 file changed

+33
-27
lines changed

apps/dashboard/components/layout/navigation/website-header.tsx

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,30 @@ interface WebsiteHeaderProps {
1111

1212
export function WebsiteHeader({ website }: WebsiteHeaderProps) {
1313
return (
14-
<div className="flex flex-col gap-2">
15-
<div>
16-
<Button
17-
asChild
18-
className="group w-full cursor-pointer justify-start text-muted-foreground hover:text-foreground"
19-
size="sm"
20-
variant="ghost"
21-
>
22-
<Link href="/websites">
23-
<CaretLeftIcon
24-
className="group-hover:-translate-x-0.5 mr-2 h-4 w-4 transition-transform"
25-
size={32}
26-
weight="fill"
27-
/>
28-
<span>Back to Websites</span>
29-
</Link>
30-
</Button>
31-
</div>
14+
<div className="space-y-3">
15+
{/* Back button */}
16+
<Button
17+
asChild
18+
className="group w-full justify-start text-muted-foreground hover:text-foreground"
19+
size="sm"
20+
variant="ghost"
21+
>
22+
<Link href="/websites">
23+
<CaretLeftIcon
24+
className="group-hover:-translate-x-0.5 mr-2 h-4 w-4 transition-transform"
25+
size={32}
26+
weight="fill"
27+
/>
28+
Back to Websites
29+
</Link>
30+
</Button>
3231

33-
<div className="rounded-lg border border-border/50 bg-accent/30 px-2 py-2">
34-
<h2 className="flex items-center truncate font-semibold text-base">
32+
{/* Website info card */}
33+
<div className="rounded-lg border bg-card p-3">
34+
<div className="flex items-center gap-3">
3535
<FaviconImage
3636
altText={`${website?.name || website?.domain || 'Website'} favicon`}
37-
className="mr-2"
37+
className="flex-shrink-0"
3838
domain={website?.domain || ''}
3939
fallbackIcon={
4040
<PlanetIcon
@@ -45,12 +45,18 @@ export function WebsiteHeader({ website }: WebsiteHeaderProps) {
4545
}
4646
size={20}
4747
/>
48-
{website?.name || website?.domain || (
49-
<Skeleton className="h-5 w-36" />
50-
)}
51-
</h2>
52-
<div className="mt-1 truncate pl-6 text-muted-foreground text-xs">
53-
{website?.domain || <Skeleton className="h-4 w-24" />}
48+
<div className="min-w-0 flex-1">
49+
<h2 className="truncate font-semibold text-sm">
50+
{website?.name || website?.domain || (
51+
<Skeleton className="h-4 w-32" />
52+
)}
53+
</h2>
54+
{website?.domain && (
55+
<p className="truncate text-muted-foreground text-xs">
56+
{website.domain}
57+
</p>
58+
)}
59+
</div>
5460
</div>
5561
</div>
5662
</div>

0 commit comments

Comments
 (0)