File tree Expand file tree Collapse file tree 4 files changed +16
-2
lines changed
Expand file tree Collapse file tree 4 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 1+ import { useEffect } from 'react' ;
2+ import { Navigate } from 'react-router-dom' ;
3+
4+ export function DebugDefaultRoute ( ) {
5+ useEffect ( ( ) => {
6+ console . log ( 'DebugDefaultRoute: Default route hit, redirecting to /my-data' ) ;
7+ } , [ ] ) ;
8+
9+ return < Navigate to = "/my-data" replace /> ;
10+ }
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { Button } from '@/components/ui/button';
33import { useLoginLogout } from '@/hooks/useLoginLogout' ;
44
55export default function ConnectWallet ( ) {
6+ console . log ( 'ConnectWallet: Component rendering...' ) ;
67 const { login } = useLoginLogout ( ) ;
78
89 return (
Original file line number Diff line number Diff line change @@ -9,8 +9,10 @@ import ConnectWallet from './ConnectWallet.tsx';
99import { DebugRouter } from '@/components/DebugRouter.tsx' ;
1010
1111export default function MainLayout ( ) {
12+ console . log ( 'MainLayout: Component rendering...' ) ;
1213 useWatchAccount ( ) ;
1314 const { isConnected } = useUserStore ( ) ;
15+ console . log ( 'MainLayout: isConnected =' , isConnected ) ;
1416
1517 return (
1618 < div className = "flex" >
Original file line number Diff line number Diff line change 11import Resources from '@/views/resources' ;
2- import { createBrowserRouter , Navigate } from 'react-router-dom' ;
2+ import { createBrowserRouter } from 'react-router-dom' ;
33import MainLayout from './layouts/MainLayout.tsx' ;
44import ContactList from './views/contact/contactList.tsx' ;
55import SendMessage from './views/contact/sendMessage.tsx' ;
66import AddProtectedData from './views/myData/addProtectedData.tsx' ;
77import ProtectedData from './views/myData/protectedData.tsx' ;
88import ProtectedDataList from './views/myData/protectedDataList.tsx' ;
9+ import { DebugDefaultRoute } from '@/components/DebugDefaultRoute.tsx' ;
910
1011export const router = createBrowserRouter (
1112 [
@@ -15,7 +16,7 @@ export const router = createBrowserRouter(
1516 {
1617 index : true ,
1718 path : '*' ,
18- element : < Navigate to = "/my-data" replace /> ,
19+ element : < DebugDefaultRoute /> ,
1920 } ,
2021 {
2122 path : '/my-data' ,
You can’t perform that action at this time.
0 commit comments