@@ -3,6 +3,7 @@ import {ReactElement, ReactNode, useEffect, useState} from "react";
33import { Defaults } from "@taikai/dappkit" ;
44import { useRouter } from "next/router" ;
55
6+ import ExternalLinkIcon from "assets/icons/external-link-icon" ;
67import HelpIcon from "assets/icons/help-icon" ;
78import LogoPlaceholder from "assets/icons/logo-placeholder" ;
89import PlusIcon from "assets/icons/plus-icon" ;
@@ -45,7 +46,7 @@ export default function MainNav() {
4546 const { searchNetworks } = useApi ( ) ;
4647 const { getURLWithNetwork } = useNetworkTheme ( ) ;
4748
48- const noNeedNetworkInstance = [ "/networks" , "/new-network" , "/bounty-hall " , "/leaderboard" ] . includes ( pathname ) ;
49+ const noNeedNetworkInstance = [ "/networks" , "/new-network" , "/explore " , "/leaderboard" ] . includes ( pathname ) ;
4950 const fullLogoUrl = state . Service ?. network ?. active ?. fullLogo ;
5051
5152 useEffect ( ( ) => {
@@ -74,7 +75,21 @@ export default function MainNav() {
7475 if ( ! window . ethereum ) return dispatch ( changeShowWeb3 ( true ) )
7576 return dispatch ( changeShowCreateBounty ( true ) )
7677
77- }
78+ }
79+
80+ function LinkExplore ( ) {
81+ return (
82+ < InternalLink
83+ className = "mt-1"
84+ href = { "/explore" }
85+ blank = { ! noNeedNetworkInstance }
86+ label = { < Translation label = { "main-nav.explorer" } /> }
87+ nav
88+ uppercase
89+ icon = { ! noNeedNetworkInstance ? < ExternalLinkIcon className = "mb-1" width = { 12 } height = { 12 } /> :null }
90+ />
91+ ) ;
92+ }
7893
7994 function LinkNetworks ( ) {
8095 return (
@@ -101,7 +116,9 @@ export default function MainNav() {
101116 function LinkBounties ( ) {
102117 return (
103118 < InternalLink
104- href = { "/bounty-hall" }
119+ href = { getURLWithNetwork ( "/bounties" , {
120+ network : state . Service ?. network ?. active ?. name ,
121+ } ) }
105122 label = { < Translation label = { "main-nav.nav-avatar.bounties" } /> }
106123 nav
107124 uppercase
@@ -110,41 +127,17 @@ export default function MainNav() {
110127 }
111128
112129 const brandLogo = ! noNeedNetworkInstance ? (
113- < InternalLink
114- href = { getURLWithNetwork ( "/" , {
115- network : state . Service ?. network ?. active ?. name ,
116- } ) }
117- icon = {
118- fullLogoUrl ? (
119- < img
120- src = { `${ state . Settings ?. urls ?. ipfs } /${ fullLogoUrl } ` }
121- width = { 104 }
122- height = { 40 }
123- />
124- ) : (
125- < LogoPlaceholder />
126- )
127- }
128- className = "brand"
129- nav
130- active
131- brand
132- />
133- ) : (
134- < InternalLink
135- href = { '/' }
136- icon = {
137- < img
138- src = { `/images/Bepro_Logo_Light.svg` }
139- width = { 104 }
140- height = { 40 }
141- />
142- }
143- className = "brand"
144- nav
145- active
146- brand
130+ fullLogoUrl ? (
131+ < img
132+ src = { `${ state . Settings ?. urls ?. ipfs } /${ fullLogoUrl } ` }
133+ width = { 104 }
134+ height = { 40 }
147135 />
136+ ) : (
137+ < LogoPlaceholder />
138+ )
139+ ) : (
140+ < img src = { `/images/Bepro_Logo_Light.svg` } width = { 104 } height = { 40 } />
148141 ) ;
149142
150143 return (
@@ -163,7 +156,6 @@ export default function MainNav() {
163156 < li >
164157 < LinkBounties />
165158 </ li >
166-
167159 < li >
168160 < InternalLink
169161 href = { getURLWithNetwork ( "/curators" , {
@@ -180,18 +172,21 @@ export default function MainNav() {
180172 < li >
181173 < LinkLeaderBoard />
182174 </ li >
175+ < li >
176+ < LinkExplore />
177+ </ li >
183178 </ ul >
184179 ) ) || (
185180 < ul className = "nav-links" >
186- < li >
187- < LinkBounties />
188- </ li >
189181 < li >
190182 < LinkNetworks />
191183 </ li >
192184 < li >
193185 < LinkLeaderBoard />
194186 </ li >
187+ < li >
188+ < LinkExplore />
189+ </ li >
195190 </ ul >
196191 ) }
197192 </ div >
0 commit comments