Skip to content

Commit 481c890

Browse files
authored
tanstack updates (#145)
1 parent 33dd033 commit 481c890

16 files changed

Lines changed: 1012 additions & 611 deletions

File tree

biome.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"!**/.vinxi",
1212
"!**/dist",
1313
"!**/app.config.timestamp_*",
14-
"!**/.nitro"
14+
"!**/.nitro",
15+
"!**/*.css"
1516
]
1617
},
1718
"formatter": {

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,20 @@
2323
"@rainbow-me/rainbowkit": "^2.2.8",
2424
"@stefanprobst/rehype-extract-toc": "^3.0.0",
2525
"@tailwindcss/typography": "^0.5.19",
26+
"@tanstack/devtools-vite": "^0.5.0",
27+
"@tanstack/react-devtools": "^0.9.4",
2628
"@tanstack/react-query": "^5.90.2",
27-
"@tanstack/react-router": "^1.158.0",
29+
"@tanstack/react-router": "^1.132.0",
2830
"@tanstack/react-router-devtools": "^1.132.11",
29-
"@tanstack/react-start": "^1.158.0",
31+
"@tanstack/react-start": "^1.132.0",
3032
"@vitejs/plugin-react": "^5.0.3",
3133
"autoprefixer": "^10.4.21",
3234
"cheerio": "^1.1.2",
3335
"clsx": "^2.1.1",
3436
"lodash-es": "^4.17.21",
3537
"lru-cache": "^11.2.2",
3638
"lucide-react": "^0.506.0",
39+
"nitro": "npm:nitro-nightly@latest",
3740
"react": "^19.1.1",
3841
"react-dom": "^19.1.1",
3942
"react-hook-form": "^7.63.0",
@@ -49,6 +52,7 @@
4952
"remark-frontmatter": "^5.0.0",
5053
"remark-mdx-frontmatter": "^5.2.0",
5154
"simple-icons": "^16.3.0",
55+
"srvx": "^0.11.0",
5256
"tailwind-merge": "^3.3.1",
5357
"tailwindcss": "4.0.11",
5458
"titleize": "^4.0.0",

pnpm-lock.yaml

Lines changed: 974 additions & 94 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/blog/08-ethui-1.1.1-ledger-devtools/index.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ Like the previous feature, this was also spearheaded by a first-time contributor
5858

5959
## Live on Gitcoin 19
6060

61-
The latest Gitcoin round is now live, and Iron Wallet is up in the Web3 Open source category. so if the project has been of use to you, consider supporting it.
62-
63-
<Embed url="https://explorer.gitcoin.co/#/round/424/0xd4cc0dd193c7dc1d665ae244ce12d7fab337a008/0xd4cc0dd193c7dc1d665ae244ce12d7fab337a008-94" />
61+
The latest Gitcoin round is now live, and Iron Wallet is up in the Web3 Open source category. so if the project has been of use to you, [consider supporting it](https://explorer.gitcoin.co/#/round/424/0xd4cc0dd193c7dc1d665ae244ce12d7fab337a008/0xd4cc0dd193c7dc1d665ae244ce12d7fab337a008-94)
6462

6563
Or just go say hi to us in DevConnect & [WalletUncon](https://twitter.com/walletuncon). We don’t bite.
6664

src/blog/13-ethui-explorer/index.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ It also doesn't help that the most popular explorer, Etherscan, has a pretty lim
6060

6161
## What about Otterscan?
6262

63-
This is a hugely popular open-source effort, Otterscan, attempting to replicate Etherscan's functionality in a local and private environment:
64-
65-
<Embed url="https://otterscan.io" />
63+
This is a hugely popular open-source effort, Otterscan, attempting to replicate Etherscan's functionality in a [local and private environment][otterscan]:
6664

6765
However, for development workflows, it has some drawbacks of it's own:
6866

src/components/breadcrumbs.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ export function Breadcrumbs() {
1414
const breadcrumbs: { label: string; path: string }[] = matches.reduce(
1515
(acc, { context, pathname }) => {
1616
if (
17-
context?.breadcrumb &&
17+
context &&
18+
typeof context === "object" &&
19+
"breadcrumb" in context &&
20+
typeof context.breadcrumb === "string" &&
1821
context.breadcrumb !== acc[acc.length - 1]?.label
1922
) {
2023
acc.push({ label: context.breadcrumb, path: pathname });

src/routeTree.gen.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { Route as rootRouteImport } from './routes/__root'
1212
import { Route as LRouteImport } from './routes/_l'
1313
import { Route as IndexRouteImport } from './routes/index'
1414
import { Route as DocsIndexRouteImport } from './routes/docs/index'
15-
import { Route as AuthIndexRouteImport } from './routes/auth/index'
1615
import { Route as DocsLRouteImport } from './routes/docs/_l'
1716
import { Route as DocsLNotfoundRouteImport } from './routes/docs/_l.$notfound'
1817
import { Route as LBlogLRouteImport } from './routes/_l.blog/_l'
@@ -35,11 +34,6 @@ const DocsIndexRoute = DocsIndexRouteImport.update({
3534
path: '/docs/',
3635
getParentRoute: () => rootRouteImport,
3736
} as any)
38-
const AuthIndexRoute = AuthIndexRouteImport.update({
39-
id: '/auth/',
40-
path: '/auth/',
41-
getParentRoute: () => rootRouteImport,
42-
} as any)
4337
const DocsLRoute = DocsLRouteImport.update({
4438
id: '/docs/_l',
4539
path: '/docs',
@@ -80,7 +74,6 @@ const LBlogLSlugRoute = LBlogLSlugRouteImport.update({
8074
export interface FileRoutesByFullPath {
8175
'/': typeof IndexRoute
8276
'/docs': typeof DocsLRouteWithChildren
83-
'/auth/': typeof AuthIndexRoute
8477
'/docs/': typeof DocsIndexRoute
8578
'/blog': typeof LBlogLRouteWithChildren
8679
'/docs/$notfound': typeof DocsLNotfoundRoute
@@ -92,7 +85,6 @@ export interface FileRoutesByFullPath {
9285
export interface FileRoutesByTo {
9386
'/': typeof IndexRoute
9487
'/docs': typeof DocsIndexRoute
95-
'/auth': typeof AuthIndexRoute
9688
'/docs/$notfound': typeof DocsLNotfoundRoute
9789
'/blog/$slug': typeof LBlogLSlugRoute
9890
'/docs/$section/$subsection': typeof DocsLSectionSubsectionRoute
@@ -104,7 +96,6 @@ export interface FileRoutesById {
10496
'/': typeof IndexRoute
10597
'/_l': typeof LRouteWithChildren
10698
'/docs/_l': typeof DocsLRouteWithChildren
107-
'/auth/': typeof AuthIndexRoute
10899
'/docs/': typeof DocsIndexRoute
109100
'/_l/blog/_l': typeof LBlogLRouteWithChildren
110101
'/docs/_l/$notfound': typeof DocsLNotfoundRoute
@@ -118,7 +109,6 @@ export interface FileRouteTypes {
118109
fullPaths:
119110
| '/'
120111
| '/docs'
121-
| '/auth/'
122112
| '/docs/'
123113
| '/blog'
124114
| '/docs/$notfound'
@@ -130,7 +120,6 @@ export interface FileRouteTypes {
130120
to:
131121
| '/'
132122
| '/docs'
133-
| '/auth'
134123
| '/docs/$notfound'
135124
| '/blog/$slug'
136125
| '/docs/$section/$subsection'
@@ -141,7 +130,6 @@ export interface FileRouteTypes {
141130
| '/'
142131
| '/_l'
143132
| '/docs/_l'
144-
| '/auth/'
145133
| '/docs/'
146134
| '/_l/blog/_l'
147135
| '/docs/_l/$notfound'
@@ -155,7 +143,6 @@ export interface RootRouteChildren {
155143
IndexRoute: typeof IndexRoute
156144
LRoute: typeof LRouteWithChildren
157145
DocsLRoute: typeof DocsLRouteWithChildren
158-
AuthIndexRoute: typeof AuthIndexRoute
159146
DocsIndexRoute: typeof DocsIndexRoute
160147
}
161148

@@ -182,13 +169,6 @@ declare module '@tanstack/react-router' {
182169
preLoaderRoute: typeof DocsIndexRouteImport
183170
parentRoute: typeof rootRouteImport
184171
}
185-
'/auth/': {
186-
id: '/auth/'
187-
path: '/auth'
188-
fullPath: '/auth/'
189-
preLoaderRoute: typeof AuthIndexRouteImport
190-
parentRoute: typeof rootRouteImport
191-
}
192172
'/docs/_l': {
193173
id: '/docs/_l'
194174
path: '/docs'
@@ -282,7 +262,6 @@ const rootRouteChildren: RootRouteChildren = {
282262
IndexRoute: IndexRoute,
283263
LRoute: LRouteWithChildren,
284264
DocsLRoute: DocsLRouteWithChildren,
285-
AuthIndexRoute: AuthIndexRoute,
286265
DocsIndexRoute: DocsIndexRoute,
287266
}
288267
export const routeTree = rootRouteImport

src/routes/__root.tsx

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,19 @@
1+
import { TanStackDevtools } from "@tanstack/react-devtools";
12
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
23
import {
34
createRootRouteWithContext,
45
HeadContent,
56
Outlet,
7+
type RouteContext,
68
Scripts,
79
} from "@tanstack/react-router";
8-
import { lazy, Suspense } from "react";
10+
import { TanStackRouterDevtoolsPanel } from "@tanstack/react-router-devtools";
911
import appCss from "#/app.css?url";
1012
import { Aptabase } from "#/components/aptabase";
1113
import { DefaultCatchBoundary } from "#/components/DefaultCatchBoundary";
1214
import { NotFound } from "#/components/NotFound";
1315
import { linkedData, seo } from "#/utils/seo";
1416

15-
const TanStackRouterDevtools =
16-
process.env.NODE_ENV === "production"
17-
? () => null // Render nothing in production
18-
: lazy(() =>
19-
// Lazy load in development
20-
import("@tanstack/react-router-devtools").then((res) => ({
21-
default: res.TanStackRouterDevtools,
22-
// For Embedded Mode
23-
// default: res.TanStackRouterDevtoolsPanel
24-
})),
25-
);
26-
27-
export interface RouteContext {
28-
breadcrumb?: string;
29-
}
30-
3117
const seoDescription =
3218
"High-performance Ethereum desktop app for Web3 devs. Native Hardhat & Foundry support, local smart contract explorer, and multi-wallet sync. Open-source.";
3319

@@ -122,9 +108,17 @@ function RootDocument({ children }: { children: React.ReactNode }) {
122108
</head>
123109
<body>
124110
{children}
125-
<Suspense>
126-
<TanStackRouterDevtools position="bottom-right" />
127-
</Suspense>
111+
<TanStackDevtools
112+
config={{
113+
position: "bottom-right",
114+
}}
115+
plugins={[
116+
{
117+
name: "Tanstack Router",
118+
render: <TanStackRouterDevtoolsPanel />,
119+
},
120+
]}
121+
/>
128122
<Scripts />
129123
</body>
130124
</html>

0 commit comments

Comments
 (0)