File tree Expand file tree Collapse file tree
src/routes/_library/$libraryId Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { Link , createFileRoute } from '@tanstack/react-router'
2- import { notFound , Outlet , useParams } from '@tanstack/react-router'
2+ import { notFound , Outlet } from '@tanstack/react-router'
33import { Scarf } from '~/components/Scarf'
44import { findLibrary , LibraryId } from '~/libraries'
55import { 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 } ,
You can’t perform that action at this time.
0 commit comments