Skip to content

Commit bdb3206

Browse files
bidahclaude
andcommitted
🚸 feat(nav): make logo link to /ui-prompts when on gallery routes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ef277a1 commit bdb3206

2 files changed

Lines changed: 17 additions & 12 deletions

File tree

‎apps/web/components/nav-header.tsx‎

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ import {
7575
Copy,
7676
} from 'lucide-react'
7777
import Link from 'next/link'
78+
import { usePathname } from 'next/navigation'
7879
import { useCallback, useEffect, useRef, useState } from 'react'
7980
import { useTheme } from 'next-themes'
8081
import { toast } from 'sonner'
@@ -141,6 +142,8 @@ export function NavHeader({
141142
useSubscriptionStatus()
142143
const { resolvedTheme, setTheme, theme } = useTheme()
143144
const { isDevMode, setIsDevMode } = useDevMode()
145+
const pathname = usePathname()
146+
const logoHref = pathname?.startsWith('/ui-prompts') ? '/ui-prompts' : '/'
144147

145148
// Handle client-side mounting
146149
useEffect(() => {
@@ -930,16 +933,18 @@ export function NavHeader({
930933
<>
931934
<nav className="w-full flex bg-background py-4 px-4 md:px-8 ">
932935
<div className="flex flex-1 items-center">
933-
<img
934-
src={mounted && resolvedTheme === 'dark' ? '/logo_iso_dark.svg' : '/logo_iso.svg'}
935-
alt="Logo"
936-
className="block sm:hidden w-[32px] h-[32px]"
937-
/>
938-
<img
939-
src={mounted && resolvedTheme === 'dark' ? '/react-native-vibe-code-long-logo-dark.svg' : '/react-native-vibe-code-long-logo.svg'}
940-
alt="Logo"
941-
className="hidden sm:block min-w-[500px] h-[39px] sm:w-[240px] sm:h-[58px]"
942-
/>
936+
<Link href={logoHref}>
937+
<img
938+
src={mounted && resolvedTheme === 'dark' ? '/logo_iso_dark.svg' : '/logo_iso.svg'}
939+
alt="Logo"
940+
className="block sm:hidden w-[32px] h-[32px]"
941+
/>
942+
<img
943+
src={mounted && resolvedTheme === 'dark' ? '/react-native-vibe-code-long-logo-dark.svg' : '/react-native-vibe-code-long-logo.svg'}
944+
alt="Logo"
945+
className="hidden sm:block min-w-[500px] h-[39px] sm:w-[240px] sm:h-[58px]"
946+
/>
947+
</Link>
943948
</div>
944949
<div className="flex items-center gap-1 md:gap-4">
945950
{/* Docs Button */}

‎apps/web/components/ui-prompts/prompt-detail.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ export function PromptDetail({ slug, isAuthenticated }: PromptDetailProps) {
9595
</div>
9696

9797
{/* Right: Details */}
98-
<div className="lg:w-[40%] space-y-6">
98+
<div className="lg:w-[40%] space-y-3">
9999
{/* Title + Featured Badge */}
100-
<div className="flex items-start gap-3">
100+
<div className="flex items-start gap-1">
101101
<h1 className="text-2xl font-bold text-foreground">{prompt.title}</h1>
102102
{prompt.featured && (
103103
<Badge className="bg-foreground text-background border-foreground/80 hover:bg-foreground flex-shrink-0">

0 commit comments

Comments
 (0)