File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,9 @@ const Explore: React.FC = () => {
58
58
59
59
const links = useMemo (
60
60
( ) => [
61
- { to : "/" , text : "Home" } ,
61
+ { identifier : "/" , to : "/" , text : "Home" } ,
62
62
{
63
+ identifier : "/attachment/" ,
63
64
to : isUndefined ( mainCurate ) ? "/" : `/attachment/?url=${ getIpfsUrl ( mainCurate . registry . policyURI ?? "" ) } ` ,
64
65
text : "Curation Policy" ,
65
66
} ,
@@ -70,9 +71,13 @@ const Explore: React.FC = () => {
70
71
return (
71
72
< Container >
72
73
< Title > Explore</ Title >
73
- { links . map ( ( { to, text } ) => (
74
+ { links . map ( ( { to, text, identifier } ) => (
74
75
< LinkContainer key = { text } >
75
- < StyledLink to = { to } onClick = { toggleIsOpen } isActive = { location . pathname . startsWith ( to ) } >
76
+ < StyledLink
77
+ to = { to }
78
+ onClick = { toggleIsOpen }
79
+ isActive = { identifier === "/" ? location . pathname === "/" : location . pathname . startsWith ( identifier ) }
80
+ >
76
81
{ text }
77
82
</ StyledLink >
78
83
</ LinkContainer >
You can’t perform that action at this time.
0 commit comments