feat(dapp): adds github link (#43)

This commit is contained in:
crypblizz
2022-08-10 15:26:46 +02:00
committed by GitHub
parent eb0ae61e6a
commit 6a77191dd3
3 changed files with 23 additions and 2 deletions
+17 -2
View File
@@ -4,6 +4,8 @@ import { SessionTypes } from "@walletconnect/types";
import { fonts, responsive } from "../styles";
import Button from "./Button";
import Icon from "./Icon";
import { DEFAULT_GITHUB_REPO_URL } from "../constants";
const SHeader = styled.div`
margin-top: -1px;
@@ -21,8 +23,8 @@ const SHeader = styled.div`
const SHeaderActions = styled.div`
display: flex;
& > button:first-child {
margin-right: 10px !important;
& button {
margin-left: 10px;
}
`;
@@ -33,6 +35,10 @@ const SActiveAccount = styled.div`
font-weight: 500;
`;
const GithubLogoContainer = styled.div`
padding-top: 8px;
`;
const SActiveSession = styled(SActiveAccount as any)`
flex-direction: column;
text-align: left;
@@ -64,6 +70,15 @@ const Header = (props: HeaderProps) => {
<p>{session.peer.metadata.name}</p>
</SActiveSession>
<SHeaderActions>
<GithubLogoContainer>
<a
href={DEFAULT_GITHUB_REPO_URL}
target="_blank"
rel="noreferrer"
>
<Icon size={24} src={"/assets/githubLogo.svg"} />
</a>
</GithubLogoContainer>
<Button outline color="black" onClick={ping}>
{"Ping"}
</Button>
@@ -70,3 +70,6 @@ export enum DEFAULT_SOLANA_METHODS {
}
export enum DEFAULT_SOLANA_EVENTS {}
export const DEFAULT_GITHUB_REPO_URL =
"https://github.com/WalletConnect/web-examples/tree/main/dapps/react-dapp-v2";