Skip to content

Commit

Permalink
fix: roadmap
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Dec 6, 2024
1 parent 059c320 commit b2e4f04
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 71 deletions.
2 changes: 1 addition & 1 deletion src/js/components/App/pages/Home/Intro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Intro = () => (
</Container.Container>
<Container.Container>
<Heading.H1>
<span className="text-brandRed font-bold">EKOKE</span> DAO Marketplace
<span className="text-brandRed font-bold">EKOKE</span> DAO
</Heading.H1>
</Container.Container>
<Container.Container>
Expand Down
24 changes: 12 additions & 12 deletions src/js/components/App/pages/Home/Roadmap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,27 @@ const Roadmap = () => (
will be open to everyone. It will continue until the end of the
first quarter.
</Milestone>
<Milestone title="SNS Launch" date="Q2">
The SNS will be launched in the second quarter. We'll base our DAO
on the the{' '}
<Link.Paragraph href={'https://nns.ic0.app'}>
Internet Computer SNS
</Link.Paragraph>
. The SNS will be the place where the EKOKE-DAO will be able to
discuss and vote on the decisions of the EKOKE-DAO.
</Milestone>
<Milestone title="EKOKE-DAO is registered" date="Q3">
<Milestone title="EKOKE-DAO is registered" date="Q2">
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.
</Milestone>
<Milestone title="First real-estate sold on EKOKE-DAO" date="Q4">
<Milestone title="First real-estate sold on EKOKE-DAO" date="Q3">
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
</Milestone>
<Milestone title="SNS Launch" date="Q4">
The SNS will be launched in the fourth quarter. We'll base our DAO
on the the{' '}
<Link.Paragraph href={'https://nns.ic0.app'}>
Internet Computer SNS
</Link.Paragraph>
. The SNS will be the place where the EKOKE-DAO will be able to
discuss and vote on the decisions of the EKOKE-DAO.
</Milestone>
</Container.FlexResponsiveRow>
</Container.Container>
<Container.Container>
Expand Down
58 changes: 22 additions & 36 deletions src/js/components/App/pages/Presale.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,38 @@ 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;

const Presale = () => (
<Container.Container>
<Heading.H1>EKOKE Presale</Heading.H1>
<WaitForMetamask otherwise={<LoginWithMetamask />}>
<PresaleBody />
</WaitForMetamask>
<Container.FlexResponsiveRow className="gap-4 items-start justify-around w-full">
<Container.Container className="flex-1">
<Container.Card className="!p-0">
<Info />
</Container.Card>
</Container.Container>
<Container.Container className="flex-1">
<Container.Card>
<WaitForMetamask otherwise={<LoginWithMetamask />}>
<PresaleBody />
</WaitForMetamask>
</Container.Card>
</Container.Container>
</Container.FlexResponsiveRow>
</Container.Container>
);

const LoginWithMetamask = () => (
<Container.Container>
<span className="block text-lg">
Please login with Metamask to join the presale.
</span>
<Container.FlexCols className="items-center">
<Paragraph.Default className="!text-center text-lg">
Please login with <strong>Metamask</strong> to join the presale.
</Paragraph.Default>
<MetamaskConnect />
</Container.Container>
</Container.FlexCols>
);

export interface PresaleStats {
Expand Down Expand Up @@ -131,36 +143,10 @@ const PresaleBody = () => {
}, []);

if (!stats) {
return (
<Container.FlexResponsiveRow className="gap-4 items-start justify-around">
<Container.Card>
<Container.Container className="p-8">
<Skeleton count={5} />
</Container.Container>
</Container.Card>
<Container.Card>
<Container.Container className="p-8">
<Skeleton count={5} />
</Container.Container>
</Container.Card>
</Container.FlexResponsiveRow>
);
return <Skeleton count={5} />;
}

return (
<Container.FlexResponsiveRow className="gap-4 items-start justify-around w-full">
<Container.Container className="flex-1">
<Container.Card className="!p-0">
<Info />
</Container.Card>
</Container.Container>
<Container.Container className="flex-1">
<Container.Card>
<PresaleForm {...stats} />
</Container.Card>
</Container.Container>
</Container.FlexResponsiveRow>
);
return <PresaleForm {...stats} />;
};

export default Presale;
10 changes: 5 additions & 5 deletions src/js/components/App/pages/Presale/BuyForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ const BuyForm = ({ tokenPrice }: Props) => {

return (
<Container.FlexCols className="text-left gap-4">
<Container.Container>
<form onSubmit={onBuyTokens}>
<form onSubmit={onBuyTokens}>
<Container.FlexCols className="justify-center items-center">
<Heading.H3>Buy EKOKE</Heading.H3>
<Input.IconInput
id="presale-buy-form-amount"
Expand All @@ -176,11 +176,11 @@ const BuyForm = ({ tokenPrice }: Props) => {
>
Buy {amount} EKOKE for {usdToPay.toString()} USDT
</Button.Primary>
</form>
</Container.Container>
</Container.FlexCols>
</form>
<hr />
<Container.Container>
<span className="text-text">
<span className="text-text text-center block">
You currently have a balance of{' '}
<strong>
{convertToHumanReadable(balance, EKOKE_DECIMALS, true)} EKOKE
Expand Down
49 changes: 32 additions & 17 deletions src/js/components/App/pages/Presale/PresaleForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? (
<strong>
{stats.tokensSold}/ {stats.presaleCap} EKOKE - {usdtProgress}
</strong>
) : (
<strong>{usdtProgress}</strong>
);

return (
<Container.Container>
Expand All @@ -28,25 +57,11 @@ const PresaleForm = (stats: PresaleStats) => {
<Container.FlexRow className="gap-2">
<ProgressBar
hideLabel
progress={Number(stats.tokensSold)}
progress={progressToUse}
max={capToUse}
className="h-[64px]"
/>
<span className="text-brandRed w-2/6">
<strong>
{stats.usdtRaised.toLocaleString('en-US', {
maximumFractionDigits: 0,
currency: 'USD',
style: 'currency',
})}{' '}
/{' '}
{capToUse.toLocaleString('en-US', {
maximumFractionDigits: 0,
currency: 'USD',
style: 'currency',
})}
</strong>
</span>
<span className="w-2/6">{progressBarDescription}</span>
</Container.FlexRow>
</Container.Container>
<Container.Container className="p-8">
Expand Down
8 changes: 8 additions & 0 deletions src/js/utils/platform.ts
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit b2e4f04

Please sign in to comment.