Skip to content

Commit 8ba9a59

Browse files
ericyangpanclaude
andcommitted
fix: correct BackToNavigation href paths and remove client directive
- Add leading slashes to href paths in model-providers and vendors pages - Remove unnecessary 'use client' directive from BackToNavigation component - Update JSDoc example to show correct href format with leading slash 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 147b0b9 commit 8ba9a59

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/app/[locale]/model-providers/[slug]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export default async function ProviderPage({
176176
/>
177177

178178
{/* Navigation */}
179-
<BackToNavigation href="model-providers" title={t('allModelProviders')} />
179+
<BackToNavigation href="/model-providers" title={t('allModelProviders')} />
180180

181181
<Footer />
182182
</>

src/app/[locale]/vendors/[slug]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export default async function VendorPage({
173173
<VendorModels models={vendorModels} locale={locale} title={t('models')} />
174174

175175
{/* Navigation */}
176-
<BackToNavigation href="vendors" title={t('allVendors')} />
176+
<BackToNavigation href="/vendors" title={t('allVendors')} />
177177

178178
<Footer />
179179
</>

src/components/controls/BackToNavigation.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use client'
2-
31
import { useTranslations } from 'next-intl'
42
import { Link } from '@/i18n/navigation'
53

@@ -23,7 +21,7 @@ interface BackToNavigationProps {
2321
* Automatically handles internationalization for common text like "Back to" and "[INDEX]".
2422
*
2523
* @example
26-
* <BackToNavigation href="ides" title="All IDEs" />
24+
* <BackToNavigation href="/ides" title="All IDEs" />
2725
*/
2826
export function BackToNavigation({ href, title }: BackToNavigationProps) {
2927
const t = useTranslations('components.backToNavigation')

0 commit comments

Comments
 (0)