@@ -12,6 +12,7 @@ import { Link } from 'react-router-dom';
1212import CircularMenu from 'src/components/appMenu/CircularMenu/CircularMenu' ;
1313import TimeHistory from 'src/features/TimeHistory/TimeHistory' ;
1414import MobileMenu from 'src/components/appMenu/MobileMenu/MobileMenu' ;
15+ import useCurrentAddress from 'src/hooks/useCurrentAddress' ;
1516import graphDataPrepared from '../pages/oracle/landing/graphDataPrepared.json' ;
1617import stylesOracle from '../pages/oracle/landing/OracleLanding.module.scss' ;
1718import SenseButton from '../features/sense/ui/SenseButton/SenseButton' ;
@@ -21,6 +22,8 @@ import SideHydrogenBtn from './ui/SideHydrogenBtn/SideHydrogenBtn';
2122function MainLayout ( { children } : { children : JSX . Element } ) {
2223 const { defaultAccount } = useAppSelector ( ( { pocket } ) => pocket ) ;
2324 const addressBech32 = defaultAccount . account ?. cyber . bech32 ;
25+
26+ const currentAddress = useCurrentAddress ( ) ;
2427 const { viewportWidth } = useDevice ( ) ;
2528 const ref = useRef < HTMLDivElement > ( null ) ;
2629 const dispatch = useAppDispatch ( ) ;
@@ -50,6 +53,10 @@ function MainLayout({ children }: { children: JSX.Element }) {
5053 ref . current . style . setProperty ( '--graph-size' , `${ graphSize } px` ) ;
5154 } , [ ref , graphSize ] ) ;
5255
56+ const link = currentAddress
57+ ? routes . robot . routes . brain . path
58+ : routes . brain . path ;
59+
5360 return (
5461 < div className = { styles . wrapper } ref = { ref } >
5562 < Header />
@@ -62,16 +69,13 @@ function MainLayout({ children }: { children: JSX.Element }) {
6269 { isMobile ? < MobileMenu /> : < CircularMenu circleSize = { graphSize } /> }
6370 { ! isMobile && (
6471 < Link
65- to = { routes . brain . path }
72+ to = { link }
6673 className = { stylesOracle . graphWrapper }
6774 style = { { bottom : '0px' } }
68- >
69- { /* <Link
70- to={routes.brain.path}
71- className={stylesOracle.enlargeBtn}
72- title="open full graph"
73- /> */ }
7475
76+ // className={stylesOracle.enlargeBtn}
77+ // title="open full graph"
78+ >
7579 { isRenderGraph && (
7680 < CyberlinksGraphContainer
7781 size = { graphSize }
@@ -80,13 +84,10 @@ function MainLayout({ children }: { children: JSX.Element }) {
8084 ) }
8185 </ Link >
8286 ) }
83- { /* <ActionBar /> */ }
84-
8587 < div className = { styles . Time } >
8688 { ! isMobile && < TimeHistory /> }
8789 < TimeFooter />
8890 </ div >
89- { /* <Link to={routes.social.path}>contacts</Link> */ }
9091 </ footer >
9192 </ div >
9293 ) ;
0 commit comments