Skip to content

Commit a01ebc8

Browse files
committed
Remove library versions from nav title
1 parent f8c0de3 commit a01ebc8

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

src/routes/_library/$libraryId/route.tsx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Link, createFileRoute } from '@tanstack/react-router'
2-
import { notFound, Outlet, useParams } from '@tanstack/react-router'
2+
import { notFound, Outlet } from '@tanstack/react-router'
33
import { Scarf } from '~/components/Scarf'
44
import { findLibrary, LibraryId } from '~/libraries'
55
import { seo } from '~/utils/seo'
@@ -58,30 +58,21 @@ export const Route = createFileRoute('/_library/$libraryId')({
5858
staticData: {
5959
Title: () => {
6060
const { libraryId } = Route.useParams()
61-
const { version } = useParams({ strict: false })
6261
const library = findLibrary(libraryId)
6362

6463
if (!library) {
6564
return null
6665
}
6766

6867
const libraryName = library.name.replace('TanStack ', '')
69-
const resolvedVersion =
70-
version === 'latest' ? library.latestVersion : version!
7168
const gradientText = `inline-block text-transparent bg-clip-text bg-linear-to-r ${library.colorFrom} ${library.colorTo}`
7269
return (
7370
<Link
7471
to={`/$libraryId`}
7572
params={{ libraryId }}
76-
className="relative whitespace-nowrap"
73+
className="whitespace-nowrap"
7774
>
78-
<span className={`${gradientText}`}>{libraryName}</span>{' '}
79-
<span className="text-sm absolute right-0 top-0 font-normal normal-case">
80-
{resolvedVersion}
81-
</span>
82-
<span className="text-sm opacity-0 normal-case">
83-
{resolvedVersion}
84-
</span>
75+
<span className={gradientText}>{libraryName}</span>
8576
</Link>
8677
)
8778
},

0 commit comments

Comments
 (0)