-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ef50d1
commit 241bc64
Showing
11 changed files
with
169 additions
and
68 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
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,36 @@ | ||
import styled from "styled-components"; | ||
import {Text} from "./Text"; | ||
|
||
export const Footer = () => { | ||
return ( | ||
<FooterContainer> | ||
<FooterWrapper> | ||
<Text> | ||
This project was built by a developer to contribute to the amazing web3 community with no direct affiliation with https://metamask.io/. If you found this helpful in any way, feel free to share the ❤️. | ||
</Text> | ||
<Text> | ||
ETH: 0xFd072083887bFcF8aEb8F37991c11c7743113374 | ||
</Text> | ||
</FooterWrapper> | ||
</FooterContainer> | ||
) | ||
} | ||
|
||
const FooterContainer = styled.div` | ||
width: 100%; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
` | ||
|
||
const FooterWrapper = styled.div` | ||
width: 100%; | ||
display: flex; | ||
justify-content: center; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 10px; | ||
max-width: 800px; | ||
position: absolute; | ||
bottom: 0; | ||
` |
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,52 @@ | ||
import styled, {css} from "styled-components"; | ||
import {Text} from "./Text"; | ||
import {MainHeading} from "./Heading"; | ||
import MetaMaskCard from "./MetaMaskCard"; | ||
import React from "react"; | ||
import {useWeb3React} from "@web3-react/core"; | ||
|
||
export const Header = () => { | ||
const { account } = useWeb3React(); | ||
return ( | ||
<HeaderContainer> | ||
<HeaderWrapper> | ||
<MainHeading> | ||
MetaMask Encrypt/Decrypt | ||
</MainHeading> | ||
{!account ? ( | ||
<ConnectSection> | ||
<p>Use the section below to connect to MetaMask wallet provider</p> | ||
<MetaMaskCard /> | ||
</ConnectSection> | ||
) : ( | ||
<Text>Connected with account: {account}</Text> | ||
)} | ||
</HeaderWrapper> | ||
</HeaderContainer> | ||
) | ||
} | ||
|
||
const HeaderContainer = styled.div` | ||
width: 100%; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
` | ||
|
||
const HeaderWrapper = styled.div` | ||
width: 100%; | ||
display: flex; | ||
justify-content: center; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 10px; | ||
max-width: 800px; | ||
` | ||
|
||
const ConnectSection = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
width: 100%; | ||
gap: 20px; | ||
`; |
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,5 @@ | ||
import styled from "styled-components"; | ||
|
||
export const MainHeading = styled.h1` | ||
text-align: center; | ||
` |
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,5 @@ | ||
import styled from "styled-components"; | ||
|
||
export const Text = styled.p` | ||
text-align: center; | ||
` |
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