Remove session from nav for auth (#51)

* Removed session from nav

* Add note that you can copy the qrcode

* Moving WC icon to the right
This commit is contained in:
Celine Sarafa 2022-09-05 10:50:21 +03:00 committed by GitHub
parent 5a438ac92a
commit aedddbcbdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 26 deletions

View File

@ -13,7 +13,7 @@ import AuthClient from "@walletconnect/auth-client";
import type { NextPage } from "next";
import Link from "next/link";
import Qrcode from "qrcode";
import { useCallback, useEffect, useRef, useState } from "react";
import { Fragment, useCallback, useEffect, useRef, useState } from "react";
const Home: NextPage = () => {
const [client, setClient] = useState<AuthClient | null>();
@ -91,18 +91,26 @@ const Home: NextPage = () => {
Sign in with WalletConnect
</Button>
{uri && (
<canvas
onClick={() => {
navigator.clipboard.writeText(uri).then(() => {
toast({
title: "URI copied to clipboard",
status: "success",
duration: 1000,
<Fragment>
<canvas
onClick={() => {
navigator.clipboard.writeText(uri).then(() => {
toast({
title: "URI copied to clipboard",
status: "success",
duration: 1000,
});
});
});
}}
ref={canvasRef}
/>
}}
ref={canvasRef}
/>
<Text
color="gray.400"
style={{ fontStyle: "italic", fontSize: "0.75em" }}
>
(You can copy the URI by clicking the QR code above)
</Text>
</Fragment>
)}
</Flex>
</form>

View File

@ -11,9 +11,15 @@ export default function Navigation() {
</a>
</Link>
<Link href="/sessions" passHref>
<Link href="/pairings" passHref>
<a className="navLink">
<Image alt="sessions icon" src="/icons/sessions-icon.svg" width={27} height={27} />
<Image alt="pairings icon" src="/icons/pairings-icon.svg" width={25} height={25} />
</a>
</Link>
<Link href="/settings" passHref>
<a className="navLink">
<Image alt="settings icon" src="/icons/settings-icon.svg" width={27} height={27} />
</a>
</Link>
@ -34,18 +40,6 @@ export default function Navigation() {
/>
</a>
</Link>
<Link href="/pairings" passHref>
<a className="navLink">
<Image alt="pairings icon" src="/icons/pairings-icon.svg" width={25} height={25} />
</a>
</Link>
<Link href="/settings" passHref>
<a className="navLink">
<Image alt="settings icon" src="/icons/settings-icon.svg" width={27} height={27} />
</a>
</Link>
</Row>
)
}