-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #168 from ourzora/display-founders-allocation
Add founders allocation to about page
- Loading branch information
Showing
4 changed files
with
102 additions
and
5 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import { Box, Flex, PopUp, Text } from '@zoralabs/zord' | ||
import { useState } from 'react' | ||
|
||
import { Avatar } from 'src/components/Avatar' | ||
import { Icon } from 'src/components/Icon' | ||
import { ETHERSCAN_BASE_URL } from 'src/constants/etherscan' | ||
import { useEnsData } from 'src/hooks' | ||
import { AddressType } from 'src/typings' | ||
|
||
interface FounderProps { | ||
wallet: AddressType | ||
ownershipPct: number | ||
vestExpiry: number | ||
} | ||
|
||
export const Founder: React.FC<FounderProps> = ({ wallet, ownershipPct, vestExpiry }) => { | ||
const [showTooltip, setShowTooltip] = useState(false) | ||
const { displayName, ensAvatar } = useEnsData(wallet as string) | ||
const vestDate = new Date(vestExpiry * 1000).toLocaleDateString(undefined, { | ||
year: 'numeric', | ||
month: 'short', | ||
day: 'numeric', | ||
}) | ||
return ( | ||
<Flex | ||
direction={'row'} | ||
align={'center'} | ||
justify={'space-between'} | ||
w={'100%'} | ||
borderStyle="solid" | ||
borderColor="border" | ||
borderWidth="normal" | ||
borderRadius="curved" | ||
p="x4" | ||
px="x6" | ||
> | ||
<Flex direction={'row'} align={'center'}> | ||
<Avatar address={wallet} src={ensAvatar} size={'40'} /> | ||
<Flex direction={'column'} ml={'x2'}> | ||
<Text | ||
as="a" | ||
target="_blank" | ||
rel="noreferrer noopener" | ||
href={`${ETHERSCAN_BASE_URL}/address/${wallet}`} | ||
fontWeight={'display'} | ||
> | ||
{displayName} | ||
</Text> | ||
</Flex> | ||
</Flex> | ||
<Flex align={'center'} justify="center"> | ||
<Text fontWeight={'display'} mr="x2"> | ||
{ownershipPct}% | ||
</Text> | ||
<Box | ||
cursor="pointer" | ||
style={{ zIndex: 102 }} | ||
onMouseOver={() => setShowTooltip(true)} | ||
onMouseLeave={() => setShowTooltip(false)} | ||
> | ||
<Icon id="info-16" size="sm" /> | ||
</Box> | ||
<PopUp open={showTooltip} trigger={<></>}> | ||
<Box>{`In effect until ${vestDate}`}</Box> | ||
</PopUp> | ||
</Flex> | ||
</Flex> | ||
) | ||
} |
fdf5963
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nouns-builder – ./apps/web
nouns-builder-ourzora.vercel.app
nouns-builder-git-main-ourzora.vercel.app
zouns-builder.vercel.app
www.nouns.build
nouns.build
fdf5963
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
testnet-nouns-builder – ./apps/web
testnet.nouns.build
testnet-nouns-builder-git-main-ourzora.vercel.app
testnet-nouns-builder-ourzora.vercel.app