-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: header + welcome section #114
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
def034f
chore: remove annoying styled plugin
gabitoesmiapodo 3981df2
chore: remove some unused components
gabitoesmiapodo 2fc0d9d
refactor: update and enhance several aspects from the CSS variables
gabitoesmiapodo 7b8d357
refactor: remove InnerContainer as it's not needed for this particula…
gabitoesmiapodo 93e98a3
feat: update header looks and main menu items
gabitoesmiapodo 7fd7aba
feat: add basic examples component
gabitoesmiapodo e5290da
feat: add clouds component
gabitoesmiapodo 2b6cc00
feat: add ghost component
gabitoesmiapodo 142df1a
feat: add welcome section
gabitoesmiapodo f56f80f
refactor: update home
gabitoesmiapodo c7a15d2
refactor: main menu
gabitoesmiapodo 04b52e6
chore: update db-ui-toolkit version
gabitoesmiapodo bd850d3
Merge branch 'main' into feat/#107-header-#108-welcome-section
gabitoesmiapodo 9383ceb
refactor: move examples to a more appropriate folder
gabitoesmiapodo 0aade01
refactor: move components to a less threatening and less confusing fo…
gabitoesmiapodo a80d49b
feat: add custom avatar
gabitoesmiapodo 29375c1
feat: add secondary button
gabitoesmiapodo 56b8882
chore: update theme for primary and secondary buttons
gabitoesmiapodo 1dd0049
feat: add github and docs button for the welcome page
gabitoesmiapodo 33502b2
feat: rename WelcomSection to Welcome, add text and buttons
gabitoesmiapodo 1a688b4
refactor: welcome section buttons to use some common code
gabitoesmiapodo f94818f
feat: add github clone copy string thing
gabitoesmiapodo 222c5de
fix: component overflowing issue
gabitoesmiapodo 1e19420
fix: avatar typings
gabitoesmiapodo 5abd8a3
fix: menu items constant type
gabitoesmiapodo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🧠