11import { Footer } from '~/components/Footer'
22import { partners } from '~/utils/partners'
33import { seo } from '~/utils/seo'
4- import { Link , useNavigate } from '@tanstack/react-router'
54import { z } from 'zod'
65import { Library } from '~/libraries'
76import { useState } from 'react'
87import * as React from 'react'
98import { MdClose , MdFilterList } from 'react-icons/md'
9+ import { startProject } from '~/libraries/start'
10+ import { routerProject } from '~/libraries/router'
11+ import { queryProject } from '~/libraries/query'
12+ import { tableProject } from '~/libraries/table'
13+ import { configProject } from '~/libraries/config'
14+ import { dbProject } from '~/libraries/db'
15+ import { formProject } from '~/libraries/form'
16+ import { pacerProject } from '~/libraries/pacer'
17+ import { rangerProject } from '~/libraries/ranger'
18+ import { storeProject } from '~/libraries/store'
19+ import { virtualProject } from '~/libraries/virtual'
20+
21+ const availableLibraries = [
22+ startProject ,
23+ routerProject ,
24+ queryProject ,
25+ tableProject ,
26+ formProject ,
27+ virtualProject ,
28+ rangerProject ,
29+ storeProject ,
30+ pacerProject ,
31+ dbProject ,
32+ configProject ,
33+ ]
1034
1135const librarySchema = z . enum ( [
1236 'start' ,
@@ -21,6 +45,7 @@ const librarySchema = z.enum([
2145 'db' ,
2246 'config' ,
2347 'react-charts' ,
48+ 'devtools' ,
2449 'create-tsrouter-app' ,
2550] )
2651
@@ -48,7 +73,6 @@ interface FilterProps {
4873 onStatusChange : ( status : 'active' | 'inactive' | undefined ) => void
4974 onClearAll : ( ) => void
5075}
51-
5276function PartnersFilter ( {
5377 selectedLibraries,
5478 selectedStatus,
@@ -58,20 +82,6 @@ function PartnersFilter({
5882} : FilterProps ) {
5983 const [ isOpen , setIsOpen ] = useState ( false )
6084
61- const availableLibraries : Array < { id : Library [ 'id' ] ; name : string } > = [
62- { id : 'start' , name : 'TanStack Start' } ,
63- { id : 'router' , name : 'TanStack Router' } ,
64- { id : 'query' , name : 'TanStack Query' } ,
65- { id : 'table' , name : 'TanStack Table' } ,
66- { id : 'form' , name : 'TanStack Form' } ,
67- { id : 'virtual' , name : 'TanStack Virtual' } ,
68- { id : 'ranger' , name : 'TanStack Ranger' } ,
69- { id : 'store' , name : 'TanStack Store' } ,
70- { id : 'pacer' , name : 'TanStack Pacer' } ,
71- { id : 'db' , name : 'TanStack DB' } ,
72- { id : 'config' , name : 'TanStack Config' } ,
73- ]
74-
7585 const toggleLibrary = ( libraryId : Library [ 'id' ] ) => {
7686 if ( ! selectedLibraries ) {
7787 onLibrariesChange ( [ libraryId ] )
@@ -196,14 +206,16 @@ function PartnersFilter({
196206 const isSelected =
197207 selectedLibraries ?. includes ( library . id ) || false
198208
209+ const bgStyle = library . bgStyle ?? 'bg-gray-500'
210+
199211 return (
200212 < button
201213 key = { library . id }
202214 onClick = { ( ) => toggleLibrary ( library . id ) }
203215 className = { `text-left px-3 py-2 rounded-md text-sm transition-colors ${
204216 isSelected
205- ? 'bg-blue-500 text-white'
206- : 'bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600'
217+ ? ` ${ bgStyle } text-white`
218+ : ` ${ bgStyle } /30 text-gray-700 dark:text-gray-300 hover:${ bgStyle } /40`
207219 } `}
208220 >
209221 { library . name }
@@ -287,10 +299,9 @@ export default function RouteComp() {
287299 const hasResults = filteredPartners . length > 0
288300 const isShowingPrevious = search . status === 'inactive'
289301 const isShowingActive = search . status === 'active'
290- const isShowingAll = ! search . status
291302
292303 return (
293- < div className = "flex flex-col max- w-full min-h-screen gap-12 p-4 md:p-8 pb-0" >
304+ < div className = "flex flex-col w-full min-h-screen gap-12 p-4 md:p-8 pb-0" >
294305 < div className = "flex-1 space-y-16 w-full max-w-4xl mx-auto" >
295306 < header className = "text-center pt-8" >
296307 < h1 className = "text-center text-3xl leading-8 font-extrabold tracking-tight sm:text-4xl sm:leading-10 lg:leading-none mb-6" >
0 commit comments