@tanstack/router-vite-plugin 1.26.8 → 1.26.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,605 +0,0 @@
1
- import * as React from 'react';
2
- import { CgCornerUpLeft, CgSpinner } from 'react-icons/cg';
3
- import { FaDiscord, FaGithub, FaTshirt, FaTwitter } from 'react-icons/fa';
4
- import { Await, Link, getRouteApi } from '@tanstack/react-router';
5
- import { Carbon } from '~/components/Carbon';
6
- import { Footer } from '~/components/Footer';
7
- import { TbHeartHandshake } from 'react-icons/tb';
8
- import SponsorPack from '~/components/SponsorPack';
9
- import { startProject } from '~/projects/start';
10
- const menu = [{
11
- label: <div className="flex items-center gap-2">
12
- <CgCornerUpLeft className="text-lg" /> TanStack
13
- </div>,
14
- to: '/'
15
- },
16
- // {
17
- // label: (
18
- // <div className="flex items-center gap-1">
19
- // <VscPreview className="text-lg" /> Examples
20
- // </div>
21
- // ),
22
- // to: './docs/react/examples/basic',
23
- // },
24
- // {
25
- // label: (
26
- // <div className="flex items-center gap-1">
27
- // <FaBook className="text-lg" /> Docs
28
- // </div>
29
- // ),
30
- // to: './docs/',
31
- // },
32
- // {
33
- // label: (
34
- // <div className="flex items-center gap-1">
35
- // <FaGithub className="text-lg" /> GitHub
36
- // </div>
37
- // ),
38
- // to: `https://github.com/${startProject.repo}`,
39
- // },
40
- {
41
- label: <div className="flex items-center gap-1">
42
- <FaDiscord className="text-lg" /> Discord
43
- </div>,
44
- to: 'https://tlinz.com/discord'
45
- }, {
46
- label: <div className="flex items-center gap-1">
47
- <FaTshirt className="text-lg" /> Merch
48
- </div>,
49
- to: `https://cottonbureau.com/people/tanstack`
50
- }];
51
- import { Route } from "useStateDestructure.tsx";
52
- const librariesRouteApi = getRouteApi('/_libraries');
53
- export default function VersionIndex() {
54
- const {
55
- sponsorsPromise
56
- } = librariesRouteApi.useLoaderData();
57
- const {
58
- version
59
- } = Route.useParams();
60
- const [, setIsDark] = React.useState(true);
61
- React.useEffect(() => {
62
- setIsDark(window.matchMedia?.(`(prefers-color-scheme: dark)`).matches);
63
- }, []);
64
- const gradientText = `inline-block text-transparent bg-clip-text bg-gradient-to-r ${startProject.colorFrom} ${startProject.colorTo}`;
65
- return <div className="flex flex-col gap-20 md:gap-32 max-w-full">
66
- <div className="flex flex-wrap py-2 px-4 items-center justify-center text-sm max-w-screen-xl mx-auto
67
- md:text-base md:self-end">
68
- {menu?.map((item, i) => {
69
- const label = <div className="p-2 opacity-90 hover:opacity-100">{item.label}</div>;
70
- return <div key={i} className="hover:underline">
71
- {item.to.startsWith('http') ? <a href={item.to}>{label}</a> : <Link to={item.to} params>
72
- {label}
73
- </Link>}
74
- </div>;
75
- })}
76
- </div>
77
- <div className="flex flex-col items-center gap-8 text-center px-4">
78
- <div className="flex gap-2 lg:gap-4 items-center">
79
- <h1 className={`inline-block
80
- font-black text-4xl
81
- md:text-6xl
82
- lg:text-7xl relative`}>
83
- <span className={gradientText}>TanStack Start</span>
84
- </h1>
85
- </div>
86
- {/* <div className="absolute left-1/2 top-0 -translate-x-1/2 -translate-y-[150%]"> */}
87
- <div className="text-sm
88
- md:text-base font-black
89
- lg:text-lg align-super text-white animate-bounce uppercase
90
- dark:text-black bg-black dark:bg-white shadow-xl shadow-black/30 px-2 py-1 rounded-md
91
- leading-none whitespace-nowrap">
92
- Coming Soon!
93
- {/* {version === 'latest' ? latestVersion : version} */}
94
- </div>
95
- {/* </div> */}
96
- <h2 className="font-bold text-2xl max-w-md
97
- md:text-3xl
98
- lg:text-5xl lg:max-w-2xl">
99
- Full-stack React framework{' '}
100
- <span className="underline decoration-dashed decoration-yellow-500 decoration-3 underline-offset-2">
101
- powered by TanStack Router
102
- </span>{' '}
103
- </h2>
104
- <p className="text opacity-90 max-w-[500px]
105
- lg:text-xl lg:max-w-[600px]">
106
- Full-document SSR, Streaming, Server Functions, bundling and more,
107
- powered by <strong>TanStack Router</strong>, <strong>Vinxi</strong>,{' '}
108
- <strong>Nitro</strong> and <strong>Vite</strong>. Ready to deploy to
109
- your favorite hosting provider.
110
- </p>
111
- </div>
112
- <div className="space-y-8 px-4">
113
- <div className="font-black text-3xl mr-1 text-center">
114
- So when can I use it?
115
- </div>
116
- <div className="max-w-full p-8 w-[800px] mx-auto leading-loose space-y-4 bg-white dark:bg-gray-700 rounded-xl shadow-xl shadow-black/10">
117
- <div>
118
- <strong>TanStack Start </strong> is currently in development and is
119
- not yet available for public use. We are working hard to bring you
120
- the best possible experience and will be releasing more details
121
- soon. In the meantime, you can follow along with the development
122
- process by watching the commits on this very website!
123
- </div>
124
- <div>
125
- Yes, you heard that right!{' '}
126
- <strong>
127
- TanStack.com is already being built and deployed using TanStack
128
- Start
129
- </strong>
130
- ! We are eating our own dog food and are excited to share the
131
- results with you soon!
132
- </div>
133
- </div>
134
- <div className="flex items-center gap-2 flex-wrap justify-center">
135
- <a href={`https://github.com/tanstack/tanstack.com`} className={`flex items-center gap-2 py-2 px-4 bg-cyan-700 rounded text-white uppercase font-extrabold`}>
136
- <FaGithub /> View TanStack.com Source
137
- </a>
138
- <a href={`https://twitter.com/intent/post?text=${encodeURIComponent(`I'm excited for TanStack Start, new full-stack React framework coming soon from team @Tan_Stack!
139
-
140
- Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`flex items-center gap-2 py-2 px-4 bg-cyan-500 rounded text-white uppercase font-extrabold`}>
141
- <FaTwitter /> Tweet about it!
142
- </a>{' '}
143
- </div>
144
- </div>
145
- {/* <div
146
- className="text-lg flex flex-col gap-12 p-8 max-w-[1200px] mx-auto
147
- md:flex-row"
148
- >
149
- <div className="flex-1 flex flex-col gap-8 items-center">
150
- <VscWand className="text-cyan-500 text-6xl" />
151
- <div className="flex flex-col gap-4">
152
- <h3 className="uppercase text-center text-xl font-black">
153
- Built on TanStack Router
154
- </h3>
155
- <p className="text-sm text-gray-800 dark:text-gray-200 leading-6">
156
- Writing your data fetching logic by hand is over. Tell TanStack
157
- Query where to get your data and how fresh you need it to be and
158
- the rest is automatic. It handles{' '}
159
- <span className="font-semibold text-cyan-700 dark:text-cyan-400">
160
- caching, background updates and stale data out of the box with
161
- zero-configuration
162
- </span>
163
- .
164
- </p>
165
- </div>
166
- </div>
167
- <div className="flex-1 flex flex-col gap-8 items-center">
168
- <div className="text-center">
169
- <FaBolt className="text-sky-600 text-6xl" />
170
- </div>
171
- <div className="flex flex-col gap-4">
172
- <h3 className="uppercase text-center text-xl font-black">
173
- Simple & Familiar
174
- </h3>
175
- <p className="text-sm text-gray-800 dark:text-gray-200 leading-6">
176
- If you know how to work with promises or async/await, then you
177
- already know how to use TanStack Query. There's{' '}
178
- <span className="font-semibold text-sky-700 dark:text-sky-400">
179
- no global state to manage, reducers, normalization systems or
180
- heavy configurations to understand
181
- </span>
182
- . Simply pass a function that resolves your data (or throws an
183
- error) and the rest is history.
184
- </p>
185
- </div>
186
- </div>
187
- <div className="flex-1 flex flex-col gap-8 items-center">
188
- <div className="text-center">
189
- <FaCogs className="text-blue-500 text-6xl" />
190
- </div>
191
- <div className="flex flex-col gap-4">
192
- <h3 className="uppercase text-center text-xl font-black">
193
- Extensible
194
- </h3>
195
- <p className="text-sm text-gray-800 dark:text-gray-200 leading-6">
196
- TanStack Query is configurable down to each observer instance of a
197
- query with knobs and options to fit every use-case. It comes wired
198
- up with{' '}
199
- <span className="font-semibold text-blue-700 dark:text-blue-400">
200
- dedicated devtools, infinite-loading APIs, and first class
201
- mutation tools that make updating your data a breeze
202
- </span>
203
- . Don't worry though, everything is pre-configured for success!
204
- </p>
205
- </div>
206
- </div>
207
- </div> */}
208
-
209
- {/* <div className="px-4 sm:px-6 lg:px-8 mx-auto">
210
- <div className=" sm:text-center pb-16">
211
- <h3 className="text-3xl text-center mx-auto leading-tight font-extrabold tracking-tight sm:text-4xl lg:leading-none mt-2">
212
- No dependencies. All the Features.
213
- </h3>
214
- <p className="mt-4 text-xl max-w-3xl mx-auto leading-7 opacity-60">
215
- With zero dependencies, TanStack Query is extremely lean given the
216
- dense feature set it provides. From weekend hobbies all the way to
217
- enterprise e-commerce systems (Yes, I'm lookin' at you Walmart! 😉),
218
- TanStack Query is the battle-hardened tool to help you succeed at
219
- the speed of your creativity.
220
- </p>
221
- </div>
222
- <div className="grid grid-flow-row grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-10 gap-y-4 mx-auto">
223
- {[
224
- 'Backend agnostic',
225
- 'Dedicated Devtools',
226
- 'Auto Caching',
227
- 'Auto Refetching',
228
- 'Window Focus Refetching',
229
- 'Polling/Realtime Queries',
230
- 'Parallel Queries',
231
- 'Dependent Queries',
232
- 'Mutations API',
233
- 'Automatic Garbage Collection',
234
- 'Paginated/Cursor Queries',
235
- 'Load-More/Infinite Scroll Queries',
236
- 'Scroll Recovery',
237
- 'Request Cancellation',
238
- 'Suspense Ready!',
239
- 'Render-as-you-fetch',
240
- 'Prefetching',
241
- 'Variable-length Parallel Queries',
242
- 'Offline Support',
243
- 'SSR Support',
244
- 'Data Selectors',
245
- ].map((d, i) => {
246
- return (
247
- <span key={i} className="flex items-center gap-2">
248
- <FaCheckCircle className="text-green-500 " /> {d}
249
- </span>
250
- )
251
- })}
252
- </div>
253
- </div> */}
254
-
255
- {/* <div>
256
- <div className="uppercase tracking-wider text-sm font-semibold text-center text-gray-400 mb-3">
257
- Trusted in Production by
258
- </div>
259
- <marquee scrollamount="2">
260
- <div className="flex gap-2 items-center text-3xl font-bold ml-[-100%]">
261
- {(new Array(4) as string[])
262
- .fill('')
263
- .reduce(
264
- (all) => [...all, ...all],
265
- [
266
- 'Google',
267
- 'Walmart',
268
- 'Facebook',
269
- 'PayPal',
270
- 'Amazon',
271
- 'American Express',
272
- 'Microsoft',
273
- 'Target',
274
- 'Ebay',
275
- 'Autodesk',
276
- 'CarFAX',
277
- 'Docusign',
278
- 'HP',
279
- 'MLB',
280
- 'Volvo',
281
- 'Ocado',
282
- 'UPC.ch',
283
- 'EFI.com',
284
- 'ReactBricks',
285
- 'Nozzle.io',
286
- 'Uber',
287
- ]
288
- )
289
- .map((d, i) => (
290
- <span key={i} className="opacity-70 even:opacity-40">
291
- {d}
292
- </span>
293
- ))}
294
- </div>
295
- </marquee>
296
- </div> */}
297
-
298
- <div className="px-4 w-[500px] max-w-full mx-auto">
299
- <h3 className="text-center text-3xl leading-8 font-extrabold tracking-tight sm:text-4xl sm:leading-10 lg:leading-none mt-8">
300
- Partners
301
- </h3>
302
- <div className="h-8" />
303
- <div className="flex-1 flex flex-col items-center text-sm text-center
304
- bg-white shadow-xl shadow-gray-500/20 rounded-lg
305
- divide-y-2 divide-gray-500 divide-opacity-10 overflow-hidden
306
- dark:bg-gray-800 dark:shadow-none">
307
- <span className="flex items-center gap-2 p-12 text-4xl text-rose-500 font-black uppercase">
308
- Start <TbHeartHandshake /> You?
309
- </span>
310
- <div className="flex flex-col p-4 gap-4">
311
- <div>
312
- We're looking for a TanStack Start OSS Partner to go above and
313
- beyond the call of sponsorship. Are you as invested in TanStack
314
- Start as we are? Let's push the boundaries of Start together!
315
- </div>
316
- <a href="mailto:partners@tanstack.com?subject=TanStack Start Partnership" className="text-blue-500 uppercase font-black text-sm">
317
- Let's chat
318
- </a>
319
- </div>
320
- </div>
321
- </div>
322
-
323
- <div className="relative text-lg overflow-hidden">
324
- <h3 className="text-center text-3xl leading-8 font-extrabold tracking-tight sm:text-4xl sm:leading-10 lg:leading-none mt-8">
325
- Sponsors
326
- </h3>
327
- <div className="my-4 flex flex-wrap mx-auto max-w-screen-lg" style={{
328
- aspectRatio: '1/1'
329
- }}>
330
- <Await promise={sponsorsPromise} fallback={<CgSpinner className="text-2xl animate-spin" />} children={sponsors => {
331
- return <SponsorPack sponsors={sponsors} />;
332
- }} />
333
- </div>
334
- <div className="text-center">
335
- <a href="https://github.com/sponsors/tannerlinsley" className="inline-block bg-green-500 px-4 py-2 text-xl mx-auto leading-tight font-extrabold tracking-tight text-white rounded-full">
336
- Become a Sponsor!
337
- </a>
338
- </div>
339
- </div>
340
-
341
- <div className="mx-auto max-w-[400px] flex flex-col gap-2 items-center">
342
- <div className="shadow-lg rounded-lg overflow-hidden bg-white dark:bg-gray-800 dark:text-white">
343
- <Carbon />
344
- </div>
345
- <span className="text-[.7rem] bg-gray-500 bg-opacity-10 py-1 px-2 rounded text-gray-500
346
- dark:bg-opacity-20">
347
- This ad helps us be happy about our invested time and not burn out and
348
- rage-quit OSS. Yay money! 😉
349
- </span>
350
- </div>
351
-
352
- {/* <div className="flex flex-col gap-4">
353
- <div className="px-4 sm:px-6 lg:px-8 mx-auto max-w-3xl sm:text-center">
354
- <h3 className="text-3xl text-center leading-8 font-extrabold tracking-tight sm:text-4xl sm:leading-10 lg:leading-none mt-2">
355
- Less code, fewer edge cases.
356
- </h3>
357
- <p className="my-4 text-xl leading-7 text-gray-600">
358
- Instead of writing reducers, caching logic, timers, retry logic,
359
- complex async/await scripting (I could keep going...), you literally
360
- write a tiny fraction of the code you normally would. You will be
361
- surprised at how little code you're writing or how much code you're
362
- deleting when you use TanStack Query. Try it out with one of the
363
- examples below!
364
- </p>
365
- <div className="flex flex-wrap gap-2 justify-center">
366
- {(
367
- [
368
- { label: 'Angular', value: 'angular' },
369
- { label: 'React', value: 'react' },
370
- { label: 'Solid', value: 'solid' },
371
- { label: 'Svelte', value: 'svelte' },
372
- { label: 'Vue', value: 'vue' },
373
- ] as const
374
- ).map((item) => (
375
- <button
376
- key={item.value}
377
- className={`inline-block py-2 px-4 rounded text-white uppercase font-extrabold ${
378
- item.value === framework
379
- ? 'bg-cyan-500'
380
- : 'bg-gray-300 dark:bg-gray-700 hover:bg-cyan-300'
381
- }`}
382
- onClick={() => setFramework(item.value)}
383
- >
384
- {item.label}
385
- </button>
386
- ))}
387
- </div>
388
- </div>
389
- </div> */}
390
-
391
- {/* {[''].includes(framework) ? (
392
- <div className="px-2">
393
- <div className="p-8 text-center text-lg w-full max-w-screen-lg mx-auto bg-black text-white rounded-xl">
394
- Looking for the <strong>@tanstack/{framework}-query</strong>{' '}
395
- example? We could use your help to build the{' '}
396
- <strong>@tanstack/{framework}-query</strong> adapter! Join the{' '}
397
- <a
398
- href="https://tlinz.com/discord"
399
- className="text-teal-500 font-bold"
400
- >
401
- TanStack Discord Server
402
- </a>{' '}
403
- and let's get to work!
404
- </div>
405
- </div>
406
- ) : (
407
- <div className="bg-white dark:bg-black">
408
- <iframe
409
- key={framework}
410
- src={`https://stackblitz.com/github/${repo}/tree/${branch}/examples/${framework}/simple?embed=1&theme=${
411
- isDark ? 'dark' : 'light'
412
- }`}
413
- title={`tannerlinsley/${framework}-query: basic`}
414
- sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
415
- className="shadow-2xl"
416
- loading="lazy"
417
- style={{
418
- width: '100%',
419
- height: '80vh',
420
- border: '0',
421
- }}
422
- ></iframe>
423
- </div>
424
- )} */}
425
-
426
- {/* <div className="flex flex-col gap-4 items-center">
427
- <div className="font-extrabold text-xl lg:text-2xl">
428
- Wow, you've come a long way!
429
- </div>
430
- <div className="italic font-sm opacity-70">
431
- Only one thing left to do...
432
- </div>
433
- <div>
434
- <Link
435
- to="./docs/"
436
- className={`inline-block py-2 px-4 bg-cyan-500 rounded text-white uppercase font-extrabold`}
437
- >
438
- Read the Docs!
439
- </Link>
440
- </div>
441
- </div> */}
442
- <Footer />
443
- </div>;
444
- }
445
- const component = function VersionIndex() {
446
- const {
447
- sponsorsPromise
448
- } = librariesRouteApi.useLoaderData();
449
- const {
450
- version
451
- } = Route.useParams();
452
- const [, setIsDark] = React.useState(true);
453
- React.useEffect(() => {
454
- setIsDark(window.matchMedia?.(`(prefers-color-scheme: dark)`).matches);
455
- }, []);
456
- const gradientText = `inline-block text-transparent bg-clip-text bg-gradient-to-r ${startProject.colorFrom} ${startProject.colorTo}`;
457
- return <div className="flex flex-col gap-20 md:gap-32 max-w-full">
458
- <div className="flex flex-wrap py-2 px-4 items-center justify-center text-sm max-w-screen-xl mx-auto
459
- md:text-base md:self-end">
460
- {menu?.map((item, i) => {
461
- const label = <div className="p-2 opacity-90 hover:opacity-100">{item.label}</div>;
462
- return <div key={i} className="hover:underline">
463
- {item.to.startsWith('http') ? <a href={item.to}>{label}</a> : <Link to={item.to} params>
464
- {label}
465
- </Link>}
466
- </div>;
467
- })}
468
- </div>
469
- <div className="flex flex-col items-center gap-8 text-center px-4">
470
- <div className="flex gap-2 lg:gap-4 items-center">
471
- <h1 className={`inline-block
472
- font-black text-4xl
473
- md:text-6xl
474
- lg:text-7xl relative`}>
475
- <span className={gradientText}>TanStack Start</span>
476
- </h1>
477
- </div>
478
- {}
479
- <div className="text-sm
480
- md:text-base font-black
481
- lg:text-lg align-super text-white animate-bounce uppercase
482
- dark:text-black bg-black dark:bg-white shadow-xl shadow-black/30 px-2 py-1 rounded-md
483
- leading-none whitespace-nowrap">
484
- Coming Soon!
485
- {}
486
- </div>
487
- {}
488
- <h2 className="font-bold text-2xl max-w-md
489
- md:text-3xl
490
- lg:text-5xl lg:max-w-2xl">
491
- Full-stack React framework{' '}
492
- <span className="underline decoration-dashed decoration-yellow-500 decoration-3 underline-offset-2">
493
- powered by TanStack Router
494
- </span>{' '}
495
- </h2>
496
- <p className="text opacity-90 max-w-[500px]
497
- lg:text-xl lg:max-w-[600px]">
498
- Full-document SSR, Streaming, Server Functions, bundling and more,
499
- powered by <strong>TanStack Router</strong>, <strong>Vinxi</strong>,{' '}
500
- <strong>Nitro</strong> and <strong>Vite</strong>. Ready to deploy to
501
- your favorite hosting provider.
502
- </p>
503
- </div>
504
- <div className="space-y-8 px-4">
505
- <div className="font-black text-3xl mr-1 text-center">
506
- So when can I use it?
507
- </div>
508
- <div className="max-w-full p-8 w-[800px] mx-auto leading-loose space-y-4 bg-white dark:bg-gray-700 rounded-xl shadow-xl shadow-black/10">
509
- <div>
510
- <strong>TanStack Start </strong> is currently in development and is
511
- not yet available for public use. We are working hard to bring you
512
- the best possible experience and will be releasing more details
513
- soon. In the meantime, you can follow along with the development
514
- process by watching the commits on this very website!
515
- </div>
516
- <div>
517
- Yes, you heard that right!{' '}
518
- <strong>
519
- TanStack.com is already being built and deployed using TanStack
520
- Start
521
- </strong>
522
- ! We are eating our own dog food and are excited to share the
523
- results with you soon!
524
- </div>
525
- </div>
526
- <div className="flex items-center gap-2 flex-wrap justify-center">
527
- <a href={`https://github.com/tanstack/tanstack.com`} className={`flex items-center gap-2 py-2 px-4 bg-cyan-700 rounded text-white uppercase font-extrabold`}>
528
- <FaGithub /> View TanStack.com Source
529
- </a>
530
- <a href={`https://twitter.com/intent/post?text=${encodeURIComponent(`I'm excited for TanStack Start, new full-stack React framework coming soon from team @Tan_Stack!
531
-
532
- Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`flex items-center gap-2 py-2 px-4 bg-cyan-500 rounded text-white uppercase font-extrabold`}>
533
- <FaTwitter /> Tweet about it!
534
- </a>{' '}
535
- </div>
536
- </div>
537
- {}
538
-
539
- {}
540
-
541
- {}
542
-
543
- <div className="px-4 w-[500px] max-w-full mx-auto">
544
- <h3 className="text-center text-3xl leading-8 font-extrabold tracking-tight sm:text-4xl sm:leading-10 lg:leading-none mt-8">
545
- Partners
546
- </h3>
547
- <div className="h-8" />
548
- <div className="flex-1 flex flex-col items-center text-sm text-center
549
- bg-white shadow-xl shadow-gray-500/20 rounded-lg
550
- divide-y-2 divide-gray-500 divide-opacity-10 overflow-hidden
551
- dark:bg-gray-800 dark:shadow-none">
552
- <span className="flex items-center gap-2 p-12 text-4xl text-rose-500 font-black uppercase">
553
- Start <TbHeartHandshake /> You?
554
- </span>
555
- <div className="flex flex-col p-4 gap-4">
556
- <div>
557
- We're looking for a TanStack Start OSS Partner to go above and
558
- beyond the call of sponsorship. Are you as invested in TanStack
559
- Start as we are? Let's push the boundaries of Start together!
560
- </div>
561
- <a href="mailto:partners@tanstack.com?subject=TanStack Start Partnership" className="text-blue-500 uppercase font-black text-sm">
562
- Let's chat
563
- </a>
564
- </div>
565
- </div>
566
- </div>
567
-
568
- <div className="relative text-lg overflow-hidden">
569
- <h3 className="text-center text-3xl leading-8 font-extrabold tracking-tight sm:text-4xl sm:leading-10 lg:leading-none mt-8">
570
- Sponsors
571
- </h3>
572
- <div className="my-4 flex flex-wrap mx-auto max-w-screen-lg" style={{
573
- aspectRatio: '1/1'
574
- }}>
575
- <Await promise={sponsorsPromise} fallback={<CgSpinner className="text-2xl animate-spin" />} children={sponsors => {
576
- return <SponsorPack sponsors={sponsors} />;
577
- }} />
578
- </div>
579
- <div className="text-center">
580
- <a href="https://github.com/sponsors/tannerlinsley" className="inline-block bg-green-500 px-4 py-2 text-xl mx-auto leading-tight font-extrabold tracking-tight text-white rounded-full">
581
- Become a Sponsor!
582
- </a>
583
- </div>
584
- </div>
585
-
586
- <div className="mx-auto max-w-[400px] flex flex-col gap-2 items-center">
587
- <div className="shadow-lg rounded-lg overflow-hidden bg-white dark:bg-gray-800 dark:text-white">
588
- <Carbon />
589
- </div>
590
- <span className="text-[.7rem] bg-gray-500 bg-opacity-10 py-1 px-2 rounded text-gray-500
591
- dark:bg-opacity-20">
592
- This ad helps us be happy about our invested time and not burn out and
593
- rage-quit OSS. Yay money! 😉
594
- </span>
595
- </div>
596
-
597
- {}
598
-
599
- {}
600
-
601
- {}
602
- <Footer />
603
- </div>;
604
- };
605
- export { component };
@@ -1,39 +0,0 @@
1
- import * as React from 'react'
2
- import { createFileRoute, Link, Outlet } from '@tanstack/react-router'
3
- import { fetchPosts } from '../posts'
4
-
5
- export const Route = createFileRoute('/posts')({
6
- loader: fetchPosts,
7
- component: PostsComponent,
8
- })
9
-
10
- function PostsComponent() {
11
- const posts = Route.useLoaderData()
12
-
13
- return (
14
- <div className="p-2 flex gap-2">
15
- <ul className="list-disc pl-4">
16
- {[...posts, { id: 'i-do-not-exist', title: 'Non-existent Post' }]?.map(
17
- (post) => {
18
- return (
19
- <li key={post.id} className="whitespace-nowrap">
20
- <Link
21
- to="/posts/$postId"
22
- params={{
23
- postId: post.id,
24
- }}
25
- className="block py-1 text-blue-800 hover:text-blue-600"
26
- activeProps={{ className: 'text-black font-bold' }}
27
- >
28
- <div>{post.title.substring(0, 20)}</div>
29
- </Link>
30
- </li>
31
- )
32
- },
33
- )}
34
- </ul>
35
- <hr />
36
- <Outlet />
37
- </div>
38
- )
39
- }
@@ -1,8 +0,0 @@
1
- import { createFileRoute } from '@tanstack/react-router'
2
-
3
- import { importedComponent, importedLoader } from '../shared/imported'
4
-
5
- export const Route = createFileRoute('/')({
6
- component: importedComponent,
7
- loader: importedLoader,
8
- })
@@ -1,25 +0,0 @@
1
- import * as React from 'react'
2
- import { createFileRoute } from '@tanstack/react-router'
3
-
4
- import * as styles from '../style.css'
5
- import { TEST_DATA } from '../test.const'
6
-
7
- const Button = (props: { children: any }) => {
8
- return <button>{props.children}</button>
9
- }
10
-
11
- export const Route = createFileRoute('/')({
12
- component: () => {
13
- return (
14
- <div className="p-2">
15
- {test}
16
- <h3 className={styles.indexPageTitle}>{TEST_DATA.welcome}</h3>
17
- <Button>Click me</Button>
18
- </div>
19
- )
20
- },
21
- })
22
-
23
- Route.addChildren([])
24
-
25
- export const test = 'test'