Skip to content

Commit

Permalink
fix: start header redirects to start doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Balastrong committed Feb 3, 2025
1 parent 59d02bd commit cb75178
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/components/DocsLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ export function DocsLayout({
const logo = (
<DocsLogo
name={name}
linkTo={repo.replace('tanstack/', '')}
libraryId={libraryId}
version={version}
colorFrom={colorFrom}
colorTo={colorTo}
Expand Down
16 changes: 10 additions & 6 deletions app/components/DocsLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@ import { ThemeToggle } from './ThemeToggle'

type Props = {
name: string
linkTo: string
libraryId: string
version: string
colorFrom: string
colorTo: string
}

export const DocsLogo = (props: Props) => {
const { name, version, colorFrom, colorTo } = props

export const DocsLogo = ({
name,
version,
colorFrom,
colorTo,
libraryId,
}: Props) => {
const gradientText = `inline-block text-transparent bg-clip-text bg-gradient-to-r ${colorFrom} ${colorTo}`

return (
Expand All @@ -20,9 +24,9 @@ export const DocsLogo = (props: Props) => {
TanStack
</Link>
<Link
to={`/${props.linkTo}`}
to={`/$libraryId`}
className="font-bold whitespace-nowrap"
params
params={{ libraryId }}
>
<span className={`${gradientText}`}>{name}</span>{' '}
<span className="text-sm align-super">{version}</span>
Expand Down

0 comments on commit cb75178

Please sign in to comment.