From bab4e90d07a34271f506841fe17834571f61e9f7 Mon Sep 17 00:00:00 2001 From: Megha-Dev-19 Date: Fri, 28 Jul 2023 20:31:43 +0530 Subject: [PATCH 1/9] added activate and I voted sbt page --- src/App.js | 9 +++ src/components/common/Buttons.jsx | 32 +++++++++ src/components/common/DangerZone.jsx | 3 +- src/components/common/Header.jsx | 20 +++++- src/components/common/ImageTextBlock.jsx | 37 ++++++++++ src/components/common/OutlineButton.jsx | 17 ----- src/components/common/PageWrapper.jsx | 7 ++ src/components/common/PrimaryButton.jsx | 16 ----- src/pages/Activate.jsx | 88 ++++++++++++++++++++++++ src/pages/CommunitySBT.jsx | 69 +++++-------------- src/pages/index.js | 2 +- src/pages/unAuth/index.js | 36 +++++++++- src/styles/index.css | 12 ++-- src/utils/constants.js | 1 + 14 files changed, 252 insertions(+), 97 deletions(-) create mode 100644 src/components/common/Buttons.jsx create mode 100644 src/components/common/ImageTextBlock.jsx delete mode 100644 src/components/common/OutlineButton.jsx create mode 100644 src/components/common/PageWrapper.jsx delete mode 100644 src/components/common/PrimaryButton.jsx create mode 100644 src/pages/Activate.jsx diff --git a/src/App.js b/src/App.js index 5cb936f..2edb2b6 100644 --- a/src/App.js +++ b/src/App.js @@ -9,6 +9,7 @@ import { URLs } from './utils/constants'; import ProgressTracker from './components/common/ProgressTracker'; import CustomHeader from './components/common/Header'; import CustomFooter from './components/common/Footer'; +import ActivatePage from './pages/Activate'; const Wrapper = ({ children }) => { return ( @@ -64,6 +65,14 @@ export function App() { } /> + + + + } + /> diff --git a/src/components/common/Buttons.jsx b/src/components/common/Buttons.jsx new file mode 100644 index 0000000..3637301 --- /dev/null +++ b/src/components/common/Buttons.jsx @@ -0,0 +1,32 @@ +import React from 'react'; + +export const OutlineButton = ({ onClick, children, classes, disabled }) => { + return ( + + ); +}; + +export const PrimaryButton = ({ onClick, children, classes, disabled }) => { + return ( + + ); +}; diff --git a/src/components/common/DangerZone.jsx b/src/components/common/DangerZone.jsx index 6b7a8b0..d159d3d 100644 --- a/src/components/common/DangerZone.jsx +++ b/src/components/common/DangerZone.jsx @@ -1,8 +1,7 @@ import React, { useState, Fragment, useEffect } from 'react'; import { Dialog, Transition } from '@headlessui/react'; import { ExclamationIcon } from '../../images/ExclamationIcon'; -import { PrimaryButton } from './PrimaryButton'; -import { OutlineButton } from './OutlineButton'; +import { PrimaryButton, OutlineButton } from '../common/Buttons'; import { useDispatch, useSelector } from 'react-redux'; import { handleErrorMessage, diff --git a/src/components/common/Header.jsx b/src/components/common/Header.jsx index bfbf7c6..0cdec29 100644 --- a/src/components/common/Header.jsx +++ b/src/components/common/Header.jsx @@ -64,11 +64,13 @@ const CustomHeader = () => { onClick={() => { dispatch(setActivePageIndex(null)); navigate('/'); + setMobileMenuOpen(false); }} className={ !isActive(URLs.SCOREBOARD) && !isActive(URLs.SBTs) && - !isNumber(activePageIndex) + !isNumber(activePageIndex) && + !isActive(URLs.ACTIVATE) ? 'text-gradient' : '' } @@ -76,17 +78,29 @@ const CustomHeader = () => { Home
navigate('/community-sbts')} + onClick={() => { + navigate(URLs.SBTs); + setMobileMenuOpen(false); + }} className={isActive(URLs.SBTs)} > Community SBTs
+
{ + navigate(URLs.ACTIVATE); + setMobileMenuOpen(false); + }} + className={isActive(URLs.ACTIVATE)} + > + Activate +
); }; return ( -
+