From d56d9d96a9a0a325ee0ccb4704dd10366087a3ba Mon Sep 17 00:00:00 2001 From: Thibault Jaillard Date: Wed, 5 Jul 2023 11:07:39 -0400 Subject: [PATCH 01/37] Create specific navigator and pool page --- .env.dev | 1 - src/constant/navigation.ts | 2 ++ src/drops/pages/Pools/Pools.tsx | 12 ++++++++++++ src/drops/pages/index.ts | 1 + src/navigation/index.tsx | 5 +++++ 5 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/drops/pages/Pools/Pools.tsx create mode 100644 src/drops/pages/index.ts diff --git a/.env.dev b/.env.dev index 0af46a57..27d0a1c2 100644 --- a/.env.dev +++ b/.env.dev @@ -17,4 +17,3 @@ REACT_APP_FIREBASE_STORAGE_BUCKET=lum-network.appspot.com REACT_APP_FIREBASE_MESSAGING_SENDER_ID=904911254564 REACT_APP_FIREBASE_APP_ID=1:904911254564:web:a0297e7aa68664410394b1 REACT_APP_FIREBASE_MEASUREMENT_ID=G-FZ28RMP812 - \ No newline at end of file diff --git a/src/constant/navigation.ts b/src/constant/navigation.ts index 8bc29ebe..a51c1cf8 100644 --- a/src/constant/navigation.ts +++ b/src/constant/navigation.ts @@ -4,6 +4,8 @@ export const POOLS = '/pools'; export const POOL_DETAILS = '/pools/details'; export const MY_SAVINGS = '/my-savings'; export const WINNERS = '/winners'; +export const DROPS = '/drops'; +export const DROPS_POOLS = '/drops/pools'; export const LUM_EXPLORER = 'https://explorer.lum.network'; export const DOCUMENTATION = 'https://docs.cosmosmillions.com'; export const FAQ = '#faq'; diff --git a/src/drops/pages/Pools/Pools.tsx b/src/drops/pages/Pools/Pools.tsx new file mode 100644 index 00000000..b457365a --- /dev/null +++ b/src/drops/pages/Pools/Pools.tsx @@ -0,0 +1,12 @@ +import React from 'react'; + +interface IProps {} +const Pools = ({}: IProps): JSX.Element => { + return ( +
+

Pools

+
+ ); +}; + +export default Pools; diff --git a/src/drops/pages/index.ts b/src/drops/pages/index.ts new file mode 100644 index 00000000..50d675d8 --- /dev/null +++ b/src/drops/pages/index.ts @@ -0,0 +1 @@ +export { default as DropsPoolsPage } from './Pools/Pools'; diff --git a/src/navigation/index.tsx b/src/navigation/index.tsx index 5dd371ed..b655a0af 100644 --- a/src/navigation/index.tsx +++ b/src/navigation/index.tsx @@ -3,6 +3,7 @@ import { createBrowserRouter, createRoutesFromElements, Route, Location } from ' import { Firebase } from 'utils'; import { FirebaseConstants, NavigationConstants } from 'constant'; import { HomePage, MySavingsPage, PoolsPage, DepositPage, LandingPage, Error404, Winners, PoolDetailsPage } from 'pages'; +import { DropsPoolsPage } from 'drops/pages'; import { MainLayout } from 'layout'; export const RouteListener = ({ location }: { location: Location }): JSX.Element | null => { @@ -25,6 +26,10 @@ export const router = createBrowserRouter( } /> } /> } /> + + } /> + } /> + } /> , ), From 3e84595dadd8c020f9e8271e8f9b7e8fb2265c77 Mon Sep 17 00:00:00 2001 From: Thibault Jaillard Date: Fri, 7 Jul 2023 13:14:29 -0400 Subject: [PATCH 02/37] Pools page done --- src/assets/images/cosmonaut_flying.svg | 135 ++++++++++++++++++ src/assets/index.ts | 2 + src/components/Header/Header.tsx | 49 +++++++ src/constant/navigation.ts | 2 + .../DepositDropsCard/DepositDropsCard.scss | 19 +++ .../DepositDropsCard/DepositDropsCard.tsx | 52 +++++++ src/drops/components/index.ts | 1 + src/drops/pages/Pools/Pools.tsx | 50 ++++++- src/locales/en.ts | 14 ++ src/navigation/index.tsx | 2 +- src/pages/Pools/components/PoolCard.tsx | 8 +- 11 files changed, 327 insertions(+), 7 deletions(-) create mode 100644 src/assets/images/cosmonaut_flying.svg create mode 100644 src/drops/components/DepositDropsCard/DepositDropsCard.scss create mode 100644 src/drops/components/DepositDropsCard/DepositDropsCard.tsx create mode 100644 src/drops/components/index.ts diff --git a/src/assets/images/cosmonaut_flying.svg b/src/assets/images/cosmonaut_flying.svg new file mode 100644 index 00000000..675a4e36 --- /dev/null +++ b/src/assets/images/cosmonaut_flying.svg @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/index.ts b/src/assets/index.ts index 1518dede..ba596976 100644 --- a/src/assets/index.ts +++ b/src/assets/index.ts @@ -7,6 +7,7 @@ import coinsStacked from './images/coins_stacked.svg'; import coinsStaked2 from './images/coins_stacked_2.svg'; import coinsStackedPurple from './images/coins_stacked_purple.svg'; import cosmonautCoin from './images/cosmonaut_coin.png'; +import cosmonautFlying from './images/cosmonaut_flying.svg'; import claim from './images/claim.svg'; import clock from './images/clock.svg'; import deposit from './images/deposit.svg'; @@ -66,6 +67,7 @@ const Assets = { coinsStacked, coinsStaked2, cosmonautCoin, + cosmonautFlying, claim, clock, deposit, diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index 397250c4..f1753515 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -23,6 +23,7 @@ const Header = ({ keplrModalRef, logoutModalRef }: { keplrModalRef: RefObject(); const dispatch = useDispatch(); const [isLanding, setIsLanding] = useState(false); + const [isDrops, setIsDrops] = useState(false); const [isMenuOpen, setIsMenuOpen] = useState(false); const location = useLocation(); @@ -30,6 +31,8 @@ const Header = ({ keplrModalRef, logoutModalRef }: { keplrModalRef: RefObject { setIsLanding(window.location.pathname === NavigationConstants.LANDING); + + setIsDrops(window.location.pathname.startsWith(NavigationConstants.DROPS)); }, [location.pathname]); useEffect(() => { @@ -145,6 +148,52 @@ const Header = ({ keplrModalRef, logoutModalRef }: { keplrModalRef: RefObject +
  • + `navlink ${isActive ? 'active' : ''}`}> + {I18n.t('pools.title')} + +
  • + {address && ( +
  • + `navlink position-relative ${isActive ? 'active' : ''}`}> + {I18n.t('depositDrops.myDeposits.title')} + {prizes && prizes.length > 3 && ( +
    + )} + +
  • + )} + {inBurgerMenu ? : null} +
  • +
    + + {address && !inBurgerMenu ? ( + + ) : null} +
    +
  • + + ); + } + return (