Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: start header redirects to start doc #339

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading