Skip to content

Commit 1bb310d

Browse files
debug: test simple router to isolate router issue
1 parent 56dae42 commit 1bb310d

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

src/components/TestRouter.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
2+
3+
const testRouter = createBrowserRouter([
4+
{
5+
path: '/',
6+
element: (
7+
<div style={{
8+
padding: '20px',
9+
backgroundColor: 'white',
10+
color: 'black',
11+
minHeight: '100vh'
12+
}}>
13+
<h1>Test Router Working!</h1>
14+
<p>If you can see this, the router is working correctly.</p>
15+
</div>
16+
),
17+
},
18+
], {
19+
basename: '/web3messaging',
20+
});
21+
22+
export function TestRouter() {
23+
console.log('TestRouter: Rendering test router');
24+
return <RouterProvider router={testRouter} />;
25+
}

src/main.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ import '@fontsource/inter/latin-400.css';
44
import { QueryClientProvider } from '@tanstack/react-query';
55
import React from 'react';
66
import ReactDOM from 'react-dom/client';
7-
import { RouterProvider } from 'react-router-dom';
7+
88
import { WagmiProvider } from 'wagmi';
99
import { initQueryClient } from '@/utils/initQueryClient.ts';
1010
import { initRollbarAlerting } from '@/utils/initRollbarAlerting.ts';
1111
import './index.css';
1212
import { router } from './router.tsx';
1313
import { wagmiAdapter } from './utils/wagmiConfig.ts';
1414
import { ErrorBoundary } from './components/ErrorBoundary.tsx';
15+
import { TestRouter } from './components/TestRouter.tsx';
1516

1617
console.log('Starting app initialization...');
1718

@@ -38,7 +39,7 @@ try {
3839
<ErrorBoundary>
3940
<WagmiProvider config={wagmiAdapter.wagmiConfig}>
4041
<QueryClientProvider client={queryClient}>
41-
<RouterProvider router={router} />
42+
<TestRouter />
4243
</QueryClientProvider>
4344
</WagmiProvider>
4445
</ErrorBoundary>

0 commit comments

Comments
 (0)