-
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 branch 'main' into fix-create-dao-address-validaton
- Loading branch information
Showing
10 changed files
with
553 additions
and
184 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
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> | ||
) | ||
} |
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
Oops, something went wrong.