Skip to content

Commit

Permalink
Adjusted contribution levels & disclaimer
Browse files Browse the repository at this point in the history
  • Loading branch information
namedotget committed Dec 11, 2023
1 parent c00f6f8 commit 5f5e410
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 80 deletions.
88 changes: 35 additions & 53 deletions ui/components/onboarding/ContributionLevels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function ContributionLevel({
selectedLevel,
setSelectedLevel,
selectedChain,
isRecommended
isRecommended,
}: ContributionLevelProps) {
const { user } = usePrivy()
const { login } = useLogin({
Expand Down Expand Up @@ -66,24 +66,27 @@ function ContributionLevel({

return (
<div
className={title !== "Citizen" ? `w-[320px] group transition-all duration-150 rounded-[25px] text-black cursor-pointer dark:text-white pb-8 px-7 flex flex-col items-center border-[1px] border-black dark:border-white group hover:border-orange-500 font-RobotoMono ${selectedLevel?.price === mooneyValue
? 'border-moon-orange border-opacity-100'
: 'border-opacity-60 dark:border-opacity-20'
}` : `w-[320px] group transition-all duration-150 rounded-[25px] text-black cursor-pointer dark:text-white pb-8 px-7 flex flex-col items-center border-[2px] group hover:border-orange-500 font-RobotoMono border-moon-orange border-opacity-100`}
className={
title !== 'Citizen'
? `w-[320px] group transition-all duration-150 rounded-[25px] text-black cursor-pointer dark:text-white pb-8 px-7 flex flex-col items-center border-[1px] border-black dark:border-white group hover:border-orange-500 font-RobotoMono ${
selectedLevel?.price === mooneyValue
? 'border-moon-orange border-opacity-100'
: 'border-opacity-60 dark:border-opacity-20'
}`
: `w-[320px] group transition-all duration-150 rounded-[25px] text-black cursor-pointer dark:text-white pb-8 px-7 flex flex-col items-center border-[2px] group hover:border-orange-500 font-RobotoMono border-moon-orange border-opacity-100`
}
onClick={() => {
if (!user) login()
else {
setSelectedLevel({ price: mooneyValue, hasVotingPower })
}
}}
>

<div className="h-full flex flex-col justify-between">
<div className="flex flex-col justify-center items-center">
{/*Logo*/}

<div className="mt-8">

<Image
alt={`Icon image for ${title}`}
src={lightMode ? darkIcon : lightIcon}
Expand All @@ -93,8 +96,9 @@ function ContributionLevel({
</div>
{/*Title*/}
<h1
className={`font-abel mt-[22px] text-3xl transition-all duration-150 ${selectedLevel.price === mooneyValue && 'text-moon-orange'
}`}
className={`font-abel mt-[22px] text-3xl transition-all duration-150 ${
selectedLevel.price === mooneyValue && 'text-moon-orange'
}`}
>
{title}
</h1>
Expand All @@ -119,35 +123,8 @@ function ContributionLevel({
>
{/*Perk List*/}

<div className="mt-[8px] pr-2 2xl:h-[230px] mb-8">
<ul className={`mt-1 flex flex-col list-disc w-full gap-1`}>
<div>
{
title === 'Explorer' && (
`✓ ${hasVotingPower
? (mooneyValue / 2).toLocaleString()
: mooneyValue.toLocaleString()
} $MOONEY.`
)
}
{

(title === "Citizen" || title === "Pioneer") && (
`✓ ${hasVotingPower
? (mooneyValue / 2).toLocaleString()
: mooneyValue.toLocaleString()
} $MOONEY to purchase up to (${title === "Citizen" ? 12 : 50}) Ticket to Space entries`
)
}
</div>
{
(title === "Citizen" || title === 'Pioneer') && (
`✓ ${hasVotingPower
? (mooneyValue / 2).toLocaleString()
: mooneyValue.toLocaleString()
} $MOONEY staked for two years for co-governance of the MoonDAO treasury`
)
}
<div className="mt-12 pr-2 2xl:h-[230px] mb-8">
<ul className={`flex flex-col list-disc w-full gap-1`}>
{points.map((point, i) => (
<div
key={`contribution-level-${title}-desc-point-${i}`}
Expand All @@ -161,13 +138,15 @@ function ContributionLevel({
</div>
</div>
<button
className={`mt-3 border flex justify-center items-center gap-3 ${selectedLevel.price === mooneyValue
? 'border-moon-orange'
: 'border-white-500'
} rounded-md group-hover:scale-105 group-hover:bg-moon-orange group-hover:border-moon-orange px-5 py-3 transition-all duration-150 ${selectedLevel.price === mooneyValue
className={`mt-3 border flex justify-center items-center gap-3 ${
selectedLevel.price === mooneyValue
? 'border-moon-orange'
: 'border-white-500'
} rounded-md group-hover:scale-105 group-hover:bg-moon-orange group-hover:border-moon-orange px-5 py-3 transition-all duration-150 ${
selectedLevel.price === mooneyValue
? 'bg-moon-orange'
: 'bg-transparent'
}`}
}`}
style={{
width: '261px',
height: '50px',
Expand Down Expand Up @@ -199,13 +178,14 @@ export function ContributionLevels({
lightIcon="/onboarding-icons/explorer-white.svg"
darkIcon="/onboarding-icons/explorer-black.svg"
title="Explorer"
intro="Want to go to space? You won't receive voting power or become a MoonDAO Member, but you'll have enough $MOONEY for two entries into our sweepstakes."
mooneyValue={40000}
intro="Want to go to space? You won't receive voting power or become a MoonDAO Citizen, but you will receive enough $MOONEY for one entry into our sweepstakes.
"
mooneyValue={20000}
usdQuote={usdQuotes[0]}
points={[
'Can purchase up to (2) Ticket to Space Entries',
'20,000 $MOONEY which you own and can use as you wish, such as purchase one Ticket to Space entry.',
'Unlike traditional organizations, you retain full ownership of your assets and there is no annual fee, dues, or middleman.',
'MoonDAO Marketplace Access',
'Exclusive MoonDAO Discord Access',
]}
selectedLevel={selectedLevel}
setSelectedLevel={setSelectedLevel}
Expand All @@ -216,12 +196,13 @@ export function ContributionLevels({
darkIcon="/onboarding-icons/citizen-black.svg"
title="Citizen"
intro="Take an active seat in the construction of the largest network-state focused on becoming multi-planetary. Full voting power citizen."
mooneyValue={500000}
mooneyValue={100000}
usdQuote={usdQuotes[1]}
points={[
'50,000 $MOONEY which you own and can use as you wish, such as purchasing up to (2) Ticket to Space entries',
'50,000 $MOONEY staked for two years for co-governance of the MoonDAO treasury',
'Expanded MoonDAO Discord Access including governance and project channels',
'Everything in the Explorer Tier',
'Submit Proposals for Projects',
'Free Events Access',
]}
hasVotingPower
selectedLevel={selectedLevel}
Expand All @@ -234,12 +215,13 @@ export function ContributionLevels({
darkIcon="/onboarding-icons/industry-black.svg"
title="Pioneer"
intro="For our biggest supporters, companies, and whales. If you want to deeply support what we’re doing, this is for you."
mooneyValue={2000000}
mooneyValue={500000}
usdQuote={usdQuotes[2]}
points={[
'Everything in the Citizen Tier',
'Exclusive promotion opportunities to MoonDAO community members',
'250,000 $MOONEY which you own and can use as you wish, such as purchasing up to (12) Ticket to Space entries.',
'250,000 $MOONEY staked for two years for co-governance of the MoonDAO treasury',
'Access to talent to help design, build, and test your space hardware',
'Everything in the Citizen Tier',
]}
hasVotingPower
selectedLevel={selectedLevel}
Expand Down
73 changes: 49 additions & 24 deletions ui/components/onboarding/OnboardingStageManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { usePrivy } from '@privy-io/react-auth'
import { useAddress, useContract } from '@thirdweb-dev/react'
import { TradeType } from '@uniswap/sdk-core'
import { ethers } from 'ethers'
import Link from 'next/link'
import { useEffect, useState, useRef, useMemo } from 'react'
import toast from 'react-hot-toast'
import { useTotalMooneyBalance } from '../../lib/tokens/hooks/useTotalMooneyBalance'
Expand Down Expand Up @@ -190,27 +191,49 @@ export function OnboardingStageManager({ selectedChain, usdQuotes }: any) {
setSelectedLevel={setSelectedLevel}
usdQuotes={usdQuotes}
/>
<p className="mt-5 bg-[#CBE4F7] text-[#1F212B] dark:bg-[#D7594F36] dark:text-white px-2 py-2 xl:py-3 xl:px-4 2xl:max-w-[750px] text-center xl:text-left text-sm xl:text-base">
Disclaimer: Entries into the Ticket To Space Sweepstakes are 20,000
$MOONEY each. There is no expectation of profit with $MOONEY,
<a
className="text-moon-gold"
href="https://publish.obsidian.md/moondao/MoonDAO/docs/Governance+Tokens"
>
{' '}
read more about $MOONEY
</a>
. By joining you accept our
<a
className="text-moon-gold"
href="https://publish.obsidian.md/moondao/MoonDAO/docs/Governance+Tokens"
>
{' '}
terms and conditions
</a>
.
</p>

<div className="flex flex-col gap-4 mt-5 bg-[#CBE4F7] text-[#1F212B] dark:bg-[#D7594F36] dark:text-white px-2 py-2 xl:py-3 xl:px-4 2xl:max-w-[750px] text-center xl:text-left text-sm xl:text-base">
<p>
{`
Custom Membership: Not seeing the amount that’s right for you?
Advanced users can onboard directly by purchasing any amount of
`}
<Link
className="text-moon-gold"
href="https://app.uniswap.org/swap?inputCurrency=ETH&outputCurrency=0x20d4DB1946859E2Adb0e5ACC2eac58047aD41395&chain=mainnet"
target="_blank"
rel="noopener noreferrer"
>
$MOONEY via Uniswap
</Link>{' '}
{` and `}
<Link className="text-moon-gold" href="/lock">
stake
</Link>{' '}
{`some or all of that for any amount of
time between one week and four years to maximize voting power.
`}
</p>
<p>
Disclaimer: Entries into the Ticket To Space Sweepstakes are 20,000
$MOONEY each. There is no expectation of profit with $MOONEY,
<a
className="text-moon-gold"
href="https://publish.obsidian.md/moondao/MoonDAO/docs/Governance+Tokens"
>
{' '}
read more about $MOONEY
</a>
. By joining you accept our
<a
className="text-moon-gold"
href="https://publish.obsidian.md/moondao/MoonDAO/docs/Governance+Tokens"
>
{' '}
terms and conditions
</a>
.
</p>
</div>
</div>
</StageContainer>
)
Expand Down Expand Up @@ -320,9 +343,11 @@ export function OnboardingStageManager({ selectedChain, usdQuotes }: any) {
<li>
<div className="flex cursor-pointer items-center leading-[1.3rem] no-underline focus:outline-none">
<span
className={`my-6 flex h-[40px] w-[40px] items-center justify-center rounded-full ${isActive ? 'bg-[#16a34a]' : 'bg-[#ebedef]'
} text-md font-medium ${isActive ? 'text-white' : 'text-[#40464f]'
}`}
className={`my-6 flex h-[40px] w-[40px] items-center justify-center rounded-full ${
isActive ? 'bg-[#16a34a]' : 'bg-[#ebedef]'
} text-md font-medium ${
isActive ? 'text-white' : 'text-[#40464f]'
}`}
>
{stepNumber}
</span>
Expand Down
6 changes: 3 additions & 3 deletions ui/pages/join.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ export async function getStaticProps() {
'MOONEY (PoS)'
)

const levelOneRoute = await pregenSwapRoute(Polygon, 40000, MOONEY, DAI)
const levelTwoRoute = await pregenSwapRoute(Polygon, 500000, MOONEY, DAI)
const levelThreeRoute = await pregenSwapRoute(Polygon, 2000000, MOONEY, DAI)
const levelOneRoute = await pregenSwapRoute(Polygon, 20000, MOONEY, DAI)
const levelTwoRoute = await pregenSwapRoute(Polygon, 100000, MOONEY, DAI)
const levelThreeRoute = await pregenSwapRoute(Polygon, 500000, MOONEY, DAI)

const usdQuotes = [levelOneRoute, levelTwoRoute, levelThreeRoute].map(
(swapRoute) => swapRoute?.route[0].rawQuote.toString() / 10 ** 18
Expand Down

0 comments on commit 5f5e410

Please sign in to comment.