diff --git a/src/components/common/Buttons.jsx b/src/components/common/Buttons.jsx index 3637301..592fdfa 100644 --- a/src/components/common/Buttons.jsx +++ b/src/components/common/Buttons.jsx @@ -1,8 +1,15 @@ import React from 'react'; -export const OutlineButton = ({ onClick, children, classes, disabled }) => { +export const OutlineButton = ({ + onClick, + children, + classes, + disabled, + ref, +}) => { return ( +
+ {fvToken ? ( +
+

+ Learn about how to protect integrity of the election and how + to submit to the Whistleblower Bounty Program +

+ +
+ ) : ( +
+

+ JOIN THE HUMANS OF NEAR +

+

+ Unlock Elections, Governance, & Community Treasury with{' '} + {ReadableNumber} Humans on NEAR +

+ +
+ )}
diff --git a/src/components/fractalVerification/FvVerificationTabs.jsx b/src/components/fractalVerification/FvVerificationTabs.jsx index 6a00a45..e1b51de 100644 --- a/src/components/fractalVerification/FvVerificationTabs.jsx +++ b/src/components/fractalVerification/FvVerificationTabs.jsx @@ -10,10 +10,13 @@ import { updateResponse } from '../../redux/reducer/oracleReducer'; import { insertUserData, log_event } from '../../utils/utilityFunctions'; import ReactConfetti from 'react-confetti'; import { ImageSrc, ReducerNames } from '../../utils/constants'; -import { setActivePageIndex } from '../../redux/reducer/commonReducer'; +import { + setActivePageIndex, + updateShowConfetti, +} from '../../redux/reducer/commonReducer'; const FvVerificationTabs = ({ tabs, error }) => { - const { activePageIndex, isSuccessSBTPage } = useSelector( + const { activePageIndex, isSuccessSBTPage, showConfetti } = useSelector( (state) => state[ReducerNames.COMMON] ); const dispatch = useDispatch(); @@ -23,7 +26,6 @@ const FvVerificationTabs = ({ tabs, error }) => { redirect_uri: '', }); const [loading, setLoading] = useState(true); - const [showConfetti, setShowConfetti] = useState(false); const { executeRecaptcha } = useGoogleReCaptcha(); async function checkIsUserVerified() { @@ -92,16 +94,15 @@ const FvVerificationTabs = ({ tabs, error }) => { }, [executeRecaptcha]); useEffect(() => { - if (isSuccessSBTPage) { - setShowConfetti(true); + if (showConfetti) { let timer = setTimeout(() => { - setShowConfetti(false); + dispatch(updateShowConfetti(false)); }, 5000); return () => { clearTimeout(timer); }; } - }, [isSuccessSBTPage]); + }, [showConfetti]); return ( <> diff --git a/src/components/fractalVerification/SuccessPage.jsx b/src/components/fractalVerification/SuccessPage.jsx index 696f3c9..2716bea 100644 --- a/src/components/fractalVerification/SuccessPage.jsx +++ b/src/components/fractalVerification/SuccessPage.jsx @@ -1,29 +1,125 @@ -import React, { useEffect, useState } from 'react'; -import ReactConfetti from 'react-confetti'; +import React, { Fragment, useRef, useState } from 'react'; import { CircleWavyCheck } from '../../images/CircleWavyCheck'; import TokensGrid from '../common/TokensGrid'; +import { OutlineButton, PrimaryButton } from '../common/Buttons'; +import { ImageSrc, Links } from '../../utils/constants'; +import { Dialog, Transition } from '@headlessui/react'; +import { useDispatch } from 'react-redux'; +import { updateShowConfetti } from '../../redux/reducer/commonReducer'; export const SuccesVerification = () => { - const [showConfetti, setShowConfetti] = useState(true); + const [showModal, setShowModal] = useState(true); + const dispatch = useDispatch(); - useEffect(() => { - let timer = setTimeout(() => { - setShowConfetti(false); - }, 5000); - return () => { - clearTimeout(timer); - }; - }, []); + const Link = ({ link, text }) => { + return ( + window.open(link, '_blank')} + className="text-purple-600 cursor-pointer decoration-solid underline" + > + {text} + + ); + }; + + function removeModal() { + setShowModal(false); + dispatch(updateShowConfetti(true)); + } + + const cancelButtonRef = useRef(null); return ( -
- {showConfetti && ( - - )} -
+
+ + + +
+ + +
+
+ + +
+ +

+ Before you vote in the general election, learn about the + Whistleblower Bounty Program. +

+

+ The{' '} + {' '} + offers up to 2,000 NEAR for whistleblowers who come + forward to share instances of vote buying, account buying, + election fraud, and other violations of the{' '} + +
+
+ Please make sure to read and understand the{' '} + + , which outlines the responsibilities of each voter. +

+
+ + Cancel + + +

+ I understand my responsibilities as a voter +

+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/fractalVerification/TabScreens.jsx b/src/components/fractalVerification/TabScreens.jsx index 5235968..0d7340c 100644 --- a/src/components/fractalVerification/TabScreens.jsx +++ b/src/components/fractalVerification/TabScreens.jsx @@ -135,10 +135,13 @@ export const MintSBT = ({ setError, isError }) => { We will be back in a bit.

- This system is undergoing maintenance to ensure you get - the best experience. Please check back later! + We have been impacted by the Aug 2, 2023 NEAR mainnet + upgrade which unfortunately contained a runtime error and + caused unexpected contract behavior. The Pagoda protocol + team is working on patching the mainnet. Please check back + later!

-

Thank you for your understanding!

+

Thank you for your patience!

diff --git a/src/pages/CommunitySBT.jsx b/src/pages/CommunitySBT.jsx index 64b0c6a..4661a8e 100644 --- a/src/pages/CommunitySBT.jsx +++ b/src/pages/CommunitySBT.jsx @@ -127,6 +127,11 @@ const CommunitySBTPage = () => { title="Genius" description="This SBT is a testament to your genius and visionary prowess, propelling the NEAR ecosystem to new heights with brilliant ideas. Unleash its power and shape the future like never before!" /> +
diff --git a/src/redux/reducer/commonReducer.js b/src/redux/reducer/commonReducer.js index b244c27..c265b32 100644 --- a/src/redux/reducer/commonReducer.js +++ b/src/redux/reducer/commonReducer.js @@ -8,6 +8,7 @@ export const commonReducer = createSlice({ isAdmin: false, activePageIndex: null, // for verification screens isSuccessSBTPage: false, // to show success page + showConfetti: false, }, reducers: { updateUserLogin: (state, action) => { @@ -22,6 +23,9 @@ export const commonReducer = createSlice({ updateAdminLogin: (state, action) => { state.isAdmin = action.payload; }, + updateShowConfetti: (state, action) => { + state.showConfetti = action.payload; + }, }, }); @@ -30,6 +34,7 @@ export const { setActivePageIndex, setSuccessSBTPage, updateAdminLogin, + updateShowConfetti, } = commonReducer.actions; export default commonReducer.reducer; diff --git a/src/utils/constants.js b/src/utils/constants.js index dcaa88c..af7f832 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -96,8 +96,14 @@ export const ImageSrc = { 'https://bafkreialtxsodm5coxfkkec4ybakyghk7horpxnyuifg4la4ye6vjhlf64.ipfs.nftstorage.link/', CommunityFund: 'https://bafkreicvwvjtybib7nodjus5ynomjasp3xskz2et5tkrx6k7t3h7dsq2za.ipfs.nftstorage.link/', + ELECTION_ICON: + 'https://bafkreidrd4ci3p23e7zttaq5ukpzeddyzvfdm37x3xomju3rgeq77f2dba.ipfs.nftstorage.link/', }; export const Links = { KUDOS_WIDGET: 'https://near.org/kudos.ndctools.near/widget/NDC.Kudos.Main', + WHISTLEBLOWER: + 'https://medium.com/@neardigitalcollective/introducing-ndc-whistleblower-bounty-program-d4fe1b9fc5a0', + FAIR_VOTING_POLICY: + 'https://bafkreifb4ahfglbq3knjtecqfvyhwb2nycozc3azn3gzanwzbe2xpynniu.ipfs.nftstorage.link/', }; diff --git a/src/utils/nearWallet.js b/src/utils/nearWallet.js index 6219ffd..341123b 100644 --- a/src/utils/nearWallet.js +++ b/src/utils/nearWallet.js @@ -49,7 +49,7 @@ const meteorWallet = setupMeteorWallet({ iconUrl: meteorIconUrl, }); -const DEFAULT_TGAS = '60000000000000'; +const DEFAULT_TGAS = '90000000000000'; const NO_DEPOSIT = '0'; // Wallet that simplifies using the wallet selector