Skip to content

Commit

Permalink
Merge pull request #38 from terra-money/dev/end-mint-period
Browse files Browse the repository at this point in the history
feat: end claim period
  • Loading branch information
mwmerz authored Jan 12, 2024
2 parents 52158aa + 783a8a0 commit d266961
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 41 deletions.
7 changes: 1 addition & 6 deletions frontend/src/components/navigations/desktop/DesktopNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ReactComponent as ExternalLinkIcon } from "assets/ExternalLink.svg"
import { ReactComponent as CheckIcon } from "assets/check.svg"
import { useAppContext } from "contexts"
import { useNav } from "../../../config/routes"
import { Socials } from '../socials'
import { Socials } from "../socials"
import styles from "./DesktopNav.module.scss"

const cx = classNames.bind(styles)
Expand Down Expand Up @@ -53,11 +53,6 @@ const DesktopNav = () => {
})}
</ul>
<div className={styles.button__container}>
<span
className={cx({ [styles.active]: pathname === "/" })}
>
<NavLink to={"/"}>Claim</NavLink>
</span>
<button onClick={handleConnectClick} className={styles.nav__button}>
{walletAddress ? (
<>
Expand Down
75 changes: 43 additions & 32 deletions frontend/src/components/navigations/mobile/MobileNav.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
import classNames from 'classnames/bind';
import { NavLink, useLocation } from 'react-router-dom';
import { useWallet } from "@terra-money/wallet-kit";
import { ReactComponent as Logo } from 'assets/AllianceDAOLogo.svg';
import { ReactComponent as HamburgerIcon } from 'assets/hamburger.svg';
import { ReactComponent as CloseIcon } from 'assets/close.svg';
import { ReactComponent as CheckIcon } from 'assets/check.svg';
import { ReactComponent as ExternalLinkIcon } from 'assets/ExternalLink.svg';
import classNames from "classnames/bind"
import { NavLink, useLocation } from "react-router-dom"
import { useWallet } from "@terra-money/wallet-kit"
import { ReactComponent as Logo } from "assets/AllianceDAOLogo.svg"
import { ReactComponent as HamburgerIcon } from "assets/hamburger.svg"
import { ReactComponent as CloseIcon } from "assets/close.svg"
import { ReactComponent as CheckIcon } from "assets/check.svg"
import { ReactComponent as ExternalLinkIcon } from "assets/ExternalLink.svg"
import { useAppContext } from "contexts"
import { useNav } from 'config/routes';
import styles from './MobileNav.module.scss';
import { Socials } from '../socials';
import { useNav } from "config/routes"
import styles from "./MobileNav.module.scss"
import { Socials } from "../socials"

const cx = classNames.bind(styles);
const cx = classNames.bind(styles)

const MobileNav = ({
isMobileNavOpen,
setMobileNavOpen,
}: {
isMobileNavOpen: boolean,
isMobileNavOpen: boolean
setMobileNavOpen: (isMobileNavOpen: boolean) => void
}) => {
const wallet = useWallet()
const { walletAddress } = useAppContext()
const { pathname } = useLocation();
const { menu } = useNav();
const { pathname } = useLocation()
const { menu } = useNav()

const toggleMobileNav = () => {
setMobileNavOpen(!isMobileNavOpen);
};
setMobileNavOpen(!isMobileNavOpen)
}

const handleConnectClick = () => {
if (walletAddress) {
Expand All @@ -40,17 +40,30 @@ const MobileNav = ({
return (
<>
<nav className={styles.navigation}>
<a href='/nft-gallery'>
<a href="/nft-gallery">
<Logo className={styles.logo} />
</a>

<div className={styles.hamburger} onClick={toggleMobileNav}>
<HamburgerIcon stroke="var(--token-dark-500)" height={24} width={24} />
<HamburgerIcon
stroke="var(--token-dark-500)"
height={24}
width={24}
/>
</div>
</nav>
<div className={cx(styles.cover, { [styles.open]: isMobileNavOpen })}></div>
<div className={`${styles.mobile__nav} ${isMobileNavOpen ? styles.open : ''}`}>
<div className={styles.close__icon} onClick={() => setMobileNavOpen(false)}>
<div
className={cx(styles.cover, { [styles.open]: isMobileNavOpen })}
></div>
<div
className={`${styles.mobile__nav} ${
isMobileNavOpen ? styles.open : ""
}`}
>
<div
className={styles.close__icon}
onClick={() => setMobileNavOpen(false)}
>
<CloseIcon stroke="var(--token-light-500)" height={24} width={24} />
</div>
<ul className={styles.link__container}>
Expand All @@ -66,7 +79,10 @@ const MobileNav = ({
)
}
return (
<li key={path} className={cx({ [styles.active]: pathname === path })}>
<li
key={path}
className={cx({ [styles.active]: pathname === path })}
>
<NavLink to={path} onClick={toggleMobileNav}>
{name}
</NavLink>
Expand All @@ -75,11 +91,6 @@ const MobileNav = ({
})}
</ul>
<div className={styles.bottom}>
<span
className={cx({ [styles.active]: pathname === "/" })}
>
<NavLink to={"/"}>Claim</NavLink>
</span>
<button onClick={handleConnectClick} className={styles.nav__button}>
{walletAddress ? (
<>
Expand All @@ -90,11 +101,11 @@ const MobileNav = ({
<>Connect Wallet</>
)}
</button>
<Socials size={20} gap={24} iconColor='white' />
<Socials size={20} gap={24} iconColor="white" />
</div>
</div>
</>
);
};
)
}

export default MobileNav;
export default MobileNav
5 changes: 2 additions & 3 deletions frontend/src/config/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
NotFound,
PlanetView,
ConnectModalPage,
ClaimModalPage,
NotEligibleModalPage,
} from "../pages"

Expand Down Expand Up @@ -44,8 +43,8 @@ export const useNav = () => {
...menu,
{
path: "/",
element: <ClaimModalPage />,
name: "Claim",
element: <NFTsPage />,
name: "Gallery",
isExternal: false,
isDynamic: false,
},
Expand Down

0 comments on commit d266961

Please sign in to comment.