-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…e-section feat: header + welcome section
- Loading branch information
Showing
49 changed files
with
740 additions
and
432 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
type MenuItem = { | ||
href?: string | ||
label: string | ||
to?: string | ||
} | ||
|
||
export const menuItems: MenuItem[] = [ | ||
{ | ||
label: 'Home', | ||
to: '/#top', | ||
}, | ||
{ | ||
label: 'Documentation', | ||
href: 'https://docs.dappboster.io', | ||
}, | ||
{ | ||
label: 'Examples', | ||
to: '/#examples', | ||
}, | ||
] |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,31 @@ | ||
import { Text } from 'db-ui-toolkit' | ||
import { Address } from 'viem' | ||
import { useEnsName } from 'wagmi' | ||
import { mainnet } from 'wagmi/chains' | ||
|
||
interface Props { | ||
address: Address | ||
} | ||
|
||
const EnsName = ({ address }: Props) => { | ||
const { data, error, status } = useEnsName({ | ||
address: address, | ||
chainId: mainnet.id, | ||
}) | ||
|
||
return ( | ||
<Text> | ||
{status === 'pending' ? ( | ||
<>Loading ENS name</> | ||
) : status === 'error' ? ( | ||
<>Error fetching ENS name: {error.message}</> | ||
) : ( | ||
<> | ||
<b>ENS name:</b> {data} | ||
</> | ||
)} | ||
</Text> | ||
) | ||
} | ||
|
||
export default EnsName |
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,20 @@ | ||
import { Address } from 'viem' | ||
|
||
import BaseHash from '@/src/sharedComponents/Hash' | ||
|
||
interface Props { | ||
hash: Address | ||
} | ||
|
||
const Hash = ({ hash }: Props) => { | ||
return ( | ||
<BaseHash | ||
explorerURL={`https://etherscan.io/address/${hash}`} | ||
hash={hash} | ||
onCopy={() => console.log('Copied!')} | ||
showCopyButton | ||
/> | ||
) | ||
} | ||
|
||
export default Hash |
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,41 @@ | ||
import React from 'react' | ||
import styled from 'styled-components' | ||
|
||
import { InnerContainer as Inner, ContainerPadding } from 'db-ui-toolkit' | ||
import { useAccount } from 'wagmi' | ||
|
||
import Avatar from '@/src/pageComponents/home/Examples/Items/Avatar' | ||
import BigNumberInput from '@/src/pageComponents/home/Examples/Items/BigNumberInput' | ||
import EnsName from '@/src/pageComponents/home/Examples/Items/EnsName' | ||
import Hash from '@/src/pageComponents/home/Examples/Items/Hash' | ||
|
||
const Wrapper = styled.section` | ||
background-color: var(--landing-page-main-background-color); | ||
flex-grow: 1; | ||
` | ||
|
||
const InnerContainer = styled(Inner)` | ||
align-items: center; | ||
flex-direction: column; | ||
padding-bottom: 100px; | ||
padding-top: 100px; | ||
${ContainerPadding} | ||
` | ||
|
||
const Examples: React.FC = ({ ...restProps }) => { | ||
const { address = '0x87885AaEEdED51C7e3858a782644F5d89759f245' } = useAccount() | ||
|
||
return ( | ||
<Wrapper id="examples" {...restProps}> | ||
<InnerContainer> | ||
<EnsName address={address} /> | ||
<Hash hash={address} /> | ||
<Avatar address={address} size={30} /> | ||
<BigNumberInput /> | ||
</InnerContainer> | ||
</Wrapper> | ||
) | ||
} | ||
|
||
export default Examples |
Oops, something went wrong.