Skip to content

Commit

Permalink
reorder links in the Nav, fix margin of Collapse Nav Item
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharqiewicz committed Jun 4, 2024
1 parent f921569 commit 6c9e12b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/components/Layout/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const CollapseMenu = ({
const [isOpen, { toggle }] = useBoolean(isActive);

return (
<section className={`collapse ${disabled ? 'disabled' : 'collapse-arrow'} ${isOpen ? 'collapse-open' : ''}`}>
<section className={`collapse ${disabled ? 'disabled' : 'collapse-arrow'} ${isOpen ? 'collapse-open' : ''}`}>
<button
type="button"
className={`nav-item collapse-btn collapse-title ${isActive ? 'active' : ''}`}
Expand Down Expand Up @@ -93,7 +93,7 @@ const Nav = memo(({ onClick }: NavProps) => {
{links(state).map((item, i) => {
if (item.hidden) return;
return item.submenu ? (
<div onMouseEnter={handleMouseEnter}>
<div onMouseEnter={handleMouseEnter} className="my-2.5">
<CollapseMenu
key={i}
link={item.link}
Expand Down
37 changes: 19 additions & 18 deletions src/components/Layout/links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,24 +91,6 @@ export const links: Links = ({ tenantName }) => [
},
],
},
{
link: './staking',
title: 'Staking',
props: {
className: ({ isActive } = {}) => (isActive ? 'active' : ''),
},
prefix: <StakingIcon />,
},
{
link: `https://${tenantName}.polkassembly.io/`,
title: 'Governance',
props: {
target: '_blank',
rel: 'nofollow noreferrer',
},
prefix: <GovernanceIcon />,
suffix: <ExternalIcon />,
},
{
link: '/nabla',
title: 'Forex AMM',
Expand All @@ -134,6 +116,25 @@ export const links: Links = ({ tenantName }) => [
},
],
},
{
link: './staking',
title: 'Staking',
props: {
className: ({ isActive } = {}) => (isActive ? 'active' : ''),
},
prefix: <StakingIcon />,
},
{
link: `https://${tenantName}.polkassembly.io/`,
title: 'Governance',
props: {
target: '_blank',
rel: 'nofollow noreferrer',
},
prefix: <GovernanceIcon />,
suffix: <ExternalIcon />,
},

{
link: config.alchemyPay.encodeUrlWithRedirection(config.alchemyPay.prodUrl, window.location.href),
title: 'Buy PEN',
Expand Down

0 comments on commit 6c9e12b

Please sign in to comment.