1- import { Link , createFileRoute } from '@tanstack/react-router'
1+ import { createFileRoute } from '@tanstack/react-router'
22import { twMerge } from 'tailwind-merge'
3+ import { FaDiscord , FaGithub } from 'react-icons/fa'
34import { DocContainer } from '~/components/DocContainer'
45import { DocTitle } from '~/components/DocTitle'
56import { getFrameworkOptions , getLibrary } from '~/libraries'
7+ import { FrameworkCard } from '~/components/FrameworkCard'
68
79export const Route = createFileRoute ( '/$libraryId/$version/docs/framework/' ) ( {
810 component : RouteComponent ,
911} )
1012
13+ function getPackageName (
14+ frameworkValue : string ,
15+ libraryId : string ,
16+ library : ReturnType < typeof getLibrary >
17+ ) : string {
18+ if ( frameworkValue === 'vanilla' ) {
19+ // For vanilla, use corePackageName if provided, otherwise just libraryId
20+ const coreName = library . corePackageName || libraryId
21+ return `@tanstack/${ coreName } `
22+ }
23+ // Special case: Angular Query uses experimental package
24+ if ( frameworkValue === 'angular' && libraryId === 'query' ) {
25+ return `@tanstack/angular-query-experimental`
26+ }
27+ // For other frameworks, use {framework}-{libraryId} pattern (e.g., @tanstack/react-table)
28+ return `@tanstack/${ frameworkValue } -${ libraryId } `
29+ }
30+
1131function RouteComponent ( ) {
12- const { libraryId } = Route . useParams ( )
32+ const { libraryId, version } = Route . useParams ( )
1333 const library = getLibrary ( libraryId )
1434
1535 const frameworks = getFrameworkOptions ( library . frameworks )
@@ -27,32 +47,68 @@ function RouteComponent() {
2747 < DocTitle > Supported { library . name } Frameworks</ DocTitle >
2848 < div className = "h-4" />
2949 < div className = "h-px bg-gray-500 opacity-20" />
30- < div className = "h-4" />
50+ < div className = "h-6" />
51+
52+ { /* Framework Cards Grid */ }
3153 < div
3254 className = { twMerge (
33- 'prose prose-gray prose-sm prose-p:leading-7 dark:prose-invert max-w-none' ,
34- 'styled-markdown-content'
55+ 'grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4'
3556 ) }
3657 >
37- < ul className = "text-lg" >
38- { frameworks . map ( ( framework ) => (
39- < li key = { framework . value } >
40- < Link
41- to = { `./ ${ framework . value } ` }
42- className = "flex items-center gap-2"
43- >
44- < img
45- src = { framework . logo }
46- alt = { framework . label }
47- className = "w-4 h-4 p-0 m-0"
48- />
49- TanStack { framework . label } { ' ' }
50- { library . name . replace ( 'TanStack ' , '' ) }
51- </ Link >
52- </ li >
53- ) ) }
54- </ ul >
58+ { frameworks . map ( ( framework , i ) => {
59+ const packageName = getPackageName (
60+ framework . value ,
61+ libraryId ,
62+ library
63+ )
64+ return (
65+ < FrameworkCard
66+ key = { framework . value }
67+ framework = { framework }
68+ libraryId = { libraryId }
69+ version = { version }
70+ packageName = { packageName }
71+ index = { i }
72+ library = { library }
73+ / >
74+ )
75+ } ) }
5576 </ div >
77+
78+ { /* Call to Action Message */ }
79+ < div className = "mt-12 pt-8 border-t border-gray-200 dark:border-gray-800" >
80+ < div className = "text-center max-w-2xl mx-auto" >
81+ < h3 className = "text-xl font-semibold text-gray-900 dark:text-gray-100 mb-3" >
82+ Want to add support for another framework?
83+ </ h3 >
84+ < p className = "text-gray-600 dark:text-gray-400 mb-6" >
85+ We'd love to help you create a framework adapter for{ ' ' }
86+ { library . name } . Join our community to discuss implementation
87+ details and get support.
88+ </ p >
89+ < div className = "flex flex-wrap justify-center gap-4" >
90+ < a
91+ href = "https://tlinz.com/discord"
92+ target = "_blank"
93+ rel = "noopener noreferrer"
94+ className = "inline-flex items-center gap-2 px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors"
95+ >
96+ < FaDiscord className = "w-5 h-5" />
97+ Join Discord
98+ </ a >
99+ < a
100+ href = { `https://github.com/${ library . repo } /discussions` }
101+ target = "_blank"
102+ rel = "noopener noreferrer"
103+ className = "inline-flex items-center gap-2 px-6 py-3 bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-900 rounded-lg hover:bg-gray-800 dark:hover:bg-gray-200 transition-colors"
104+ >
105+ < FaGithub className = "w-5 h-5" />
106+ Start Discussion
107+ </ a >
108+ </ div >
109+ </ div >
110+ </ div >
111+
56112 < div className = "h-24" />
57113 </ div >
58114 </ div >
0 commit comments