File tree Expand file tree Collapse file tree 4 files changed +51
-6
lines changed Expand file tree Collapse file tree 4 files changed +51
-6
lines changed Original file line number Diff line number Diff line change 1+ import useQueryContext from '@hooks/useQueryContext' ;
2+ import useRealm from '@hooks/useRealm' ;
3+ import { useRouter } from 'next/router' ;
14import ConnectWalletButton from './ConnectWalletButton' ;
25
36const NavBar = ( ) => {
7+ const { symbol } = useRealm ( ) ;
8+ const { fmtUrlWithCluster } = useQueryContext ( ) ;
9+
10+ const router = useRouter ( ) ;
11+
12+ const isDashboardPage = router . pathname . includes ( 'dashboard' ) ;
13+
414 return (
515 < div className = "grid grid-cols-12 mb-3" >
616 < div className = "col-span-12 xl:col-start-2 xl:col-span-10 flex h-20 items-center justify-between px-4 md:px-8 xl:px-4" >
717 < div className = "flex items-center" >
818 < img src = "/img/solana-logo.svg" className = "h-8 mr-3" />
919 </ div >
1020
21+ < div className = "flex flex-wrap justify-center items-center" >
22+ < button
23+ className = { `"ml-4 mr-4 mt-1.5 mb-1.5 text-white pl-4 pt pr-4 pb ${
24+ isDashboardPage ? '' : 'border border-fgd-3'
25+ } "`}
26+ onClick = { ( ) => {
27+ router . push ( fmtUrlWithCluster ( `/dao/${ symbol } ` ) ) ;
28+ } }
29+ >
30+ Vote
31+ </ button >
32+
33+ < button
34+ className = { `"ml-4 mr-4 mt-1.5 mb-1.5 text-white pl-4 pt pr-4 pb ${
35+ isDashboardPage ? 'border border-fgd-3' : ''
36+ } "`}
37+ onClick = { ( ) => {
38+ router . push ( fmtUrlWithCluster ( `/dao/${ symbol } /dashboard` ) ) ;
39+ } }
40+ >
41+ Dashboard
42+ </ button >
43+ </ div >
44+
1145 < ConnectWalletButton />
1246 </ div >
1347 </ div >
Original file line number Diff line number Diff line change 1+ import useRealm from 'hooks/useRealm' ;
2+ import React from 'react' ;
3+ import HotWallet from '@components/HotWallet/HotWallet' ;
4+
5+ const Dashboard = ( ) => {
6+ const { realm } = useRealm ( ) ;
7+
8+ if ( ! realm ) {
9+ return null ;
10+ }
11+
12+ return < HotWallet /> ;
13+ } ;
14+
15+ export default Dashboard ;
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import TokenBalanceCardWrapper from '@components/TokenBalance/TokenBalanceCardWr
1717import dynamic from 'next/dynamic' ;
1818import Loading from '@components/Loading' ;
1919import PaginationComponent from '@components/Pagination' ;
20- import HotWallet from '@components/HotWallet/HotWallet' ;
2120import SearchInput from '@components/SearchInput' ;
2221const AccountsCompactWrapper = dynamic (
2322 ( ) => import ( '@components/TreasuryAccount/AccountsCompactWrapper' ) ,
@@ -256,8 +255,6 @@ const REALM = () => {
256255 < >
257256 { connected && < TokenBalanceCardWrapper /> }
258257
259- < HotWallet />
260-
261258 < NFTSCompactWrapper />
262259
263260 { ! realm ?. account . config . useCommunityVoterWeightAddin && (
Original file line number Diff line number Diff line change @@ -4,9 +4,8 @@ const Index = () => {
44 const router = useRouter ( ) ;
55
66 useEffect ( ( ) => {
7- const { REALM } = process . env ;
8- const mainUrl = REALM ? `/dao/${ REALM } ` : '/realms' ;
9- router . replace ( mainUrl ) ;
7+ // Default page
8+ router . replace ( '/dao/UXP' ) ;
109 } , [ ] ) ;
1110
1211 return null ;
You can’t perform that action at this time.
0 commit comments