Skip to content

Commit

Permalink
fix(web): disable-curation-policy-while-loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Harman-singh-waraich committed Jun 4, 2024
1 parent 16eb48b commit 383ef68
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions web/src/layout/Header/navbar/Explore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ const Explore: React.FC = () => {

const links = useMemo(
() => [
{ to: "/", text: "Home", isLoading: false },
{ to: "/", text: "Home" },
{
to: `${IPFS_GATEWAY}${mainCurate?.registry.policyURI}`,
to: isUndefined(mainCurate) ? "/" : `${IPFS_GATEWAY}${mainCurate.registry.policyURI}`,
text: "Curation Policy",
isLoading: isUndefined(mainCurate),
},
],
[mainCurate]
Expand All @@ -70,9 +69,9 @@ const Explore: React.FC = () => {
return (
<Container>
<Title>Explore</Title>
{links.map(({ to, text, isLoading }) => (
{links.map(({ to, text }) => (
<LinkContainer key={text}>
<StyledLink to={to} onClick={() => !isLoading && toggleIsOpen()} isActive={location.pathname.startsWith(to)}>
<StyledLink to={to} onClick={toggleIsOpen} isActive={location.pathname.startsWith(to)}>
{text}
</StyledLink>
</LinkContainer>
Expand Down

0 comments on commit 383ef68

Please sign in to comment.