Skip to content

Commit d04f879

Browse files
fix: start header redirects to start doc (#339)
Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
1 parent 61428f8 commit d04f879

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

app/components/DocsLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ export function DocsLayout({
455455
const logo = (
456456
<DocsLogo
457457
name={name}
458-
linkTo={repo.replace('tanstack/', '')}
458+
libraryId={libraryId}
459459
version={version}
460460
colorFrom={colorFrom}
461461
colorTo={colorTo}

app/components/DocsLogo.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@ import { ThemeToggle } from './ThemeToggle'
33

44
type Props = {
55
name: string
6-
linkTo: string
6+
libraryId: string
77
version: string
88
colorFrom: string
99
colorTo: string
1010
}
1111

12-
export const DocsLogo = (props: Props) => {
13-
const { name, version, colorFrom, colorTo } = props
14-
12+
export const DocsLogo = ({
13+
name,
14+
version,
15+
colorFrom,
16+
colorTo,
17+
libraryId,
18+
}: Props) => {
1519
const gradientText = `inline-block text-transparent bg-clip-text bg-gradient-to-r ${colorFrom} ${colorTo}`
1620

1721
return (
@@ -20,9 +24,9 @@ export const DocsLogo = (props: Props) => {
2024
TanStack
2125
</Link>
2226
<Link
23-
to={`/${props.linkTo}`}
27+
to={`/$libraryId`}
2428
className="font-bold whitespace-nowrap"
25-
params
29+
params={{ libraryId }}
2630
>
2731
<span className={`${gradientText}`}>{name}</span>{' '}
2832
<span className="text-sm align-super">{version}</span>

0 commit comments

Comments
 (0)