From b2e4f04c75d86d5011428fbd91c382fc7e7c9bfd Mon Sep 17 00:00:00 2001 From: veeso Date: Fri, 6 Dec 2024 12:55:16 +0100 Subject: [PATCH] fix: roadmap --- src/js/components/App/pages/Home/Intro.tsx | 2 +- src/js/components/App/pages/Home/Roadmap.tsx | 24 ++++---- src/js/components/App/pages/Presale.tsx | 58 +++++++------------ .../components/App/pages/Presale/BuyForm.tsx | 10 ++-- .../App/pages/Presale/PresaleForm.tsx | 49 ++++++++++------ src/js/utils/platform.ts | 8 +++ 6 files changed, 80 insertions(+), 71 deletions(-) create mode 100644 src/js/utils/platform.ts diff --git a/src/js/components/App/pages/Home/Intro.tsx b/src/js/components/App/pages/Home/Intro.tsx index 47e4a66..4a0e64b 100644 --- a/src/js/components/App/pages/Home/Intro.tsx +++ b/src/js/components/App/pages/Home/Intro.tsx @@ -14,7 +14,7 @@ const Intro = () => ( - EKOKE DAO Marketplace + EKOKE DAO diff --git a/src/js/components/App/pages/Home/Roadmap.tsx b/src/js/components/App/pages/Home/Roadmap.tsx index cd89f58..920a9dc 100644 --- a/src/js/components/App/pages/Home/Roadmap.tsx +++ b/src/js/components/App/pages/Home/Roadmap.tsx @@ -24,27 +24,27 @@ const Roadmap = () => ( will be open to everyone. It will continue until the end of the first quarter. - - The SNS will be launched in the second quarter. We'll base our DAO - on the the{' '} - - Internet Computer SNS - - . The SNS will be the place where the EKOKE-DAO will be able to - discuss and vote on the decisions of the EKOKE-DAO. - - + EKOKE-DAO will be registered in the second quarter. The DAO will be registered as a DAO as recognized in the Wyoming state. The DAO will be able to buy and sell real-estate and to manage the funds of the EKOKE-DAO token holders. The DAO will be able to vote on the decisions of the EKOKE-DAO. - + We expect to sell the first real-estate on the EKOKE-DAO marketplace - in the fourth quarter. The real-estate will be sold in USDT and the + in the third quarter. The real-estate will be sold in USDT and the transaction will be done on the blockchain. The real-estate will be + + The SNS will be launched in the fourth quarter. We'll base our DAO + on the the{' '} + + Internet Computer SNS + + . The SNS will be the place where the EKOKE-DAO will be able to + discuss and vote on the decisions of the EKOKE-DAO. + diff --git a/src/js/components/App/pages/Presale.tsx b/src/js/components/App/pages/Presale.tsx index eb18ab3..51c28bc 100644 --- a/src/js/components/App/pages/Presale.tsx +++ b/src/js/components/App/pages/Presale.tsx @@ -15,6 +15,7 @@ import { } from '../../../utils/format'; import PresaleForm from './Presale/PresaleForm'; import Info from './Presale/Info'; +import Paragraph from '../../reusable/Paragraph'; const BASE_PRICE = 1_000_000; const STEP = 100_000_000_000; @@ -22,19 +23,30 @@ const STEP = 100_000_000_000; const Presale = () => ( EKOKE Presale - }> - - + + + + + + + + + }> + + + + + ); const LoginWithMetamask = () => ( - - - Please login with Metamask to join the presale. - + + + Please login with Metamask to join the presale. + - + ); export interface PresaleStats { @@ -131,36 +143,10 @@ const PresaleBody = () => { }, []); if (!stats) { - return ( - - - - - - - - - - - - - ); + return ; } - return ( - - - - - - - - - - - - - ); + return ; }; export default Presale; diff --git a/src/js/components/App/pages/Presale/BuyForm.tsx b/src/js/components/App/pages/Presale/BuyForm.tsx index ee2f10b..68d4263 100644 --- a/src/js/components/App/pages/Presale/BuyForm.tsx +++ b/src/js/components/App/pages/Presale/BuyForm.tsx @@ -148,8 +148,8 @@ const BuyForm = ({ tokenPrice }: Props) => { return ( - -
+ + Buy EKOKE { > Buy {amount} EKOKE for {usdToPay.toString()} USDT - -
+
+
- + You currently have a balance of{' '} {convertToHumanReadable(balance, EKOKE_DECIMALS, true)} EKOKE diff --git a/src/js/components/App/pages/Presale/PresaleForm.tsx b/src/js/components/App/pages/Presale/PresaleForm.tsx index 0860c5e..06d9820 100644 --- a/src/js/components/App/pages/Presale/PresaleForm.tsx +++ b/src/js/components/App/pages/Presale/PresaleForm.tsx @@ -8,7 +8,36 @@ import BuyForm from './BuyForm'; const BASE_PRICE_USD = 1; const PresaleForm = (stats: PresaleStats) => { - const capToUse = Number(stats.softCap); + const softCap = Number(stats.softCap); + const usdtRaised = Number(stats.usdtRaised); + const tokensSold = Number(stats.tokensSold); + const softCapReached = usdtRaised >= softCap; + const capToUse = softCapReached ? Number(stats.presaleCap) : softCap; + const progressToUse = softCapReached ? tokensSold : usdtRaised; + + const usdtProgress = ( + <> + {stats.usdtRaised.toLocaleString('en-US', { + maximumFractionDigits: 0, + currency: 'USD', + style: 'currency', + })}{' '} + /{' '} + {capToUse.toLocaleString('en-US', { + maximumFractionDigits: 0, + currency: 'USD', + style: 'currency', + })} + + ); + + const progressBarDescription = softCapReached ? ( + + {stats.tokensSold}/ {stats.presaleCap} EKOKE - {usdtProgress} + + ) : ( + {usdtProgress} + ); return ( @@ -28,25 +57,11 @@ const PresaleForm = (stats: PresaleStats) => { - - - {stats.usdtRaised.toLocaleString('en-US', { - maximumFractionDigits: 0, - currency: 'USD', - style: 'currency', - })}{' '} - /{' '} - {capToUse.toLocaleString('en-US', { - maximumFractionDigits: 0, - currency: 'USD', - style: 'currency', - })} - - + {progressBarDescription} diff --git a/src/js/utils/platform.ts b/src/js/utils/platform.ts new file mode 100644 index 0000000..26d3889 --- /dev/null +++ b/src/js/utils/platform.ts @@ -0,0 +1,8 @@ +export const isMobile = (): boolean => + typeof navigator !== 'undefined' && + navigator && + /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( + navigator.userAgent, + ); + +export default isMobile;