Skip to content

Commit 47e4240

Browse files
committed
fix: homepage errors and nested links
1 parent 4c831da commit 47e4240

File tree

2 files changed

+34
-21
lines changed

2 files changed

+34
-21
lines changed

src/routes/_libraries/index.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Await, Link, MatchRoute, getRouteApi } from '@tanstack/react-router'
2-
import { Carbon } from '~/components/Carbon'
32
import { twMerge } from 'tailwind-merge'
43
import { CgSpinner } from 'react-icons/cg'
54
import { Footer } from '~/components/Footer'
@@ -13,10 +12,11 @@ import { partners } from '../../utils/partners'
1312
import OpenSourceStats from '~/components/OpenSourceStats'
1413
import splashLightImg from '~/images/splash-light.png'
1514
import splashDarkImg from '~/images/splash-dark.png'
16-
import { GamFooter } from '~/components/Gam'
1715
import LandingPageGad from '~/components/LandingPageGad'
1816
import { MaintainerCard } from '~/components/MaintainerCard'
1917
import { coreMaintainers } from '~/libraries/maintainers'
18+
import { Suspense } from 'react'
19+
import { ErrorBoundary } from '@sentry/react'
2020

2121
export const textColors = [
2222
`text-rose-500`,
@@ -139,7 +139,13 @@ function Index() {
139139
</div>
140140
</div>
141141
<div className="w-fit mx-auto px-4">
142-
<OpenSourceStats />
142+
<div className="w-fit mx-auto px-4">
143+
<Suspense fallback={<></>}>
144+
<ErrorBoundary fallback={<></>}>
145+
<OpenSourceStats />
146+
</ErrorBoundary>
147+
</Suspense>
148+
</div>
143149
</div>
144150
</div>
145151
<div className="px-4 lg:max-w-screen-lg md:mx-auto">

src/utils/partners.tsx

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Link } from '@tanstack/react-router'
21
import agGridDarkSvg from '~/images/ag-grid-dark.svg'
32
import agGridLightSvg from '~/images/ag-grid-light.svg'
43
import nozzleImage from '~/images/nozzle.png'
@@ -223,15 +222,16 @@ const agGrid = (() => {
223222
for the entire JS/TS ecosystem. Whether it's a lightweight table or a
224223
complex datagrid, we've we've got you covered.
225224
</div>
226-
<Link
227-
to="/blog/$"
228-
params={{
229-
_splat: 'ag-grid-partnership',
225+
{/* Has to be button for separate link than parent anchor to be valid HTML */}
226+
<button
227+
type="button"
228+
onClick={() => {
229+
window.location.href = '/blog/ag-grid-partnership'
230230
}}
231231
className="text-blue-500 uppercase font-black text-sm"
232232
>
233233
Learn More
234-
</Link>
234+
</button>
235235
</>
236236
),
237237
}
@@ -365,25 +365,32 @@ const uiDev = (() => {
365365
TanStack's priority is to make its users productive, efficient and
366366
knowledgeable about web dev. To help us on this quest, we've partnered
367367
with{' '}
368-
<a
369-
target="_blank"
370-
className="text-blue-500 underline"
371-
href="https://ui.dev/?utm_source=tanstack&utm_campaign=tanstack"
372-
rel="noreferrer"
368+
{/* Has to be button for separate link than parent anchor to be valid HTML */}
369+
<button
370+
type="button"
371+
className="text-blue-500 underline cursor-pointer p-0 m-0 bg-transparent border-none inline"
372+
onClick={() =>
373+
window.open(
374+
'https://ui.dev/?utm_source=tanstack&utm_campaign=tanstack',
375+
'_blank',
376+
'noopener,noreferrer'
377+
)
378+
}
379+
tabIndex={0}
373380
>
374381
ui.dev
375-
</a>{' '}
382+
</button>{' '}
376383
to <strong>provide best-in-class education</strong> about TanStack
377384
products. It doesn't stop at TanStack though, with their sister
378385
product{' '}
379-
<a
380-
target="_blank"
381-
className="text-blue-500 underline"
382-
href={href}
383-
rel="noreferrer"
386+
<button
387+
type="button"
388+
className="text-blue-500 underline cursor-pointer p-0 m-0 bg-transparent border-none inline"
389+
onClick={() => window.open(href, '_blank', 'noopener,noreferrer')}
390+
tabIndex={0}
384391
>
385392
Bytes.dev
386-
</a>{' '}
393+
</button>{' '}
387394
as our official newsletter partner, you'll be able to{' '}
388395
<strong>stay up to date with the latest and greatest</strong> in the
389396
web dev world regardless.

0 commit comments

Comments
 (0)