From d3cf1b4966971549fdd746c24c5970f089cd5790 Mon Sep 17 00:00:00 2001 From: Filipe Medeiros Date: Fri, 3 Dec 2021 19:05:27 +0000 Subject: [PATCH] fix: top menu and copy seed feedback --- components/TopMenu.tsx | 68 +++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/components/TopMenu.tsx b/components/TopMenu.tsx index f175ae7..2ab4928 100644 --- a/components/TopMenu.tsx +++ b/components/TopMenu.tsx @@ -17,6 +17,7 @@ import decryptSeed from '../lib/decryptSeed' import useClickAway from '../lib/hooks/useClickAway' import useIsWelcoming from '../lib/hooks/useIsWelcoming' import useIsiOS from '../lib/hooks/useIsiOS' +import showNotification from '../lib/showNotification' export interface Props {} @@ -52,12 +53,17 @@ const TopMenu: FC = () => { if (renderAdvanced) setShowAdvanced(true) }, [renderAdvanced]) - const isiOS = useIsiOS() + // const isiOS = useIsiOS() const isWelcoming = useIsWelcoming() const onCopySeed = async () => { const seed = await decryptSeed('os') - navigator.clipboard.writeText(seed) + await navigator.clipboard.writeText(seed) + showNotification({ + title: 'seed copied to clipboard', + body: 'you just copied your seed to your clipboard, you can use it anywhere', + tag: 'copy-seed', + }) } return ( @@ -91,32 +97,38 @@ const TopMenu: FC = () => { boxShadow: `${colors.coolGray[900]} 0px 2px 15px`, }} > - - - +
  • + +
  • + {/*
  • + +
  • +
  • + +
  • */} )}