File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,19 +84,32 @@ function SpecialtyChip({ specialty }: { specialty: string }) {
8484}
8585
8686function LibraryBadge ( { library } : { library : Library } ) {
87+ if ( library . to ) {
88+ return (
89+ < a
90+ href = { `${ library . to } /latest/docs/contributors` }
91+ className = { `inline-flex items-center px-2.5 py-1 rounded-full text-xs font-semibold text-green-900 dark:text-green-200 ${
92+ library . bgStyle ?? 'bg-gray-500'
93+ } bg-opacity-40 dark:bg-opacity-30 capitalize hover:underline focus:outline-none focus:ring-2 focus:ring-blue-400 transition-colors`}
94+ aria-label = { `View contributors for ${ library . name } ` }
95+ tabIndex = { 0 }
96+ onClick = { ( e ) => e . stopPropagation ( ) }
97+ title = { `View all contributors for ${ library . name } ` }
98+ >
99+ { library . name . replace ( 'TanStack' , '🌴' ) }
100+ </ a >
101+ )
102+ }
87103 return (
88- < a
89- href = { `/${ library . id } /latest/docs/contributors` }
104+ < span
90105 className = { `inline-flex items-center px-2.5 py-1 rounded-full text-xs font-semibold text-green-900 dark:text-green-200 ${
91106 library . bgStyle ?? 'bg-gray-500'
92- } bg-opacity-40 dark:bg-opacity-30 capitalize hover:underline focus:outline-none focus:ring-2 focus:ring-blue-400 transition-colors `}
107+ } bg-opacity-40 dark:bg-opacity-30 capitalize`}
93108 aria-label = { `View contributors for ${ library . name } ` }
94- tabIndex = { 0 }
95- onClick = { ( e ) => e . stopPropagation ( ) }
96109 title = { `View all contributors for ${ library . name } ` }
97110 >
98111 { library . name . replace ( 'TanStack' , '🌴' ) }
99- </ a >
112+ </ span >
100113 )
101114}
102115
You can’t perform that action at this time.
0 commit comments