fix: top menu and copy seed feedback
This commit is contained in:
parent
e29f1a8edc
commit
d3cf1b4966
|
@ -17,6 +17,7 @@ import decryptSeed from '../lib/decryptSeed'
|
||||||
import useClickAway from '../lib/hooks/useClickAway'
|
import useClickAway from '../lib/hooks/useClickAway'
|
||||||
import useIsWelcoming from '../lib/hooks/useIsWelcoming'
|
import useIsWelcoming from '../lib/hooks/useIsWelcoming'
|
||||||
import useIsiOS from '../lib/hooks/useIsiOS'
|
import useIsiOS from '../lib/hooks/useIsiOS'
|
||||||
|
import showNotification from '../lib/showNotification'
|
||||||
|
|
||||||
export interface Props {}
|
export interface Props {}
|
||||||
|
|
||||||
|
@ -52,12 +53,17 @@ const TopMenu: FC<Props> = () => {
|
||||||
if (renderAdvanced) setShowAdvanced(true)
|
if (renderAdvanced) setShowAdvanced(true)
|
||||||
}, [renderAdvanced])
|
}, [renderAdvanced])
|
||||||
|
|
||||||
const isiOS = useIsiOS()
|
// const isiOS = useIsiOS()
|
||||||
const isWelcoming = useIsWelcoming()
|
const isWelcoming = useIsWelcoming()
|
||||||
|
|
||||||
const onCopySeed = async () => {
|
const onCopySeed = async () => {
|
||||||
const seed = await decryptSeed('os')
|
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 (
|
return (
|
||||||
|
@ -91,32 +97,38 @@ const TopMenu: FC<Props> = () => {
|
||||||
boxShadow: `${colors.coolGray[900]} 0px 2px 15px`,
|
boxShadow: `${colors.coolGray[900]} 0px 2px 15px`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<button
|
<li>
|
||||||
className={clsx(
|
<button
|
||||||
'p-1 rounded transition-colors duration-100 w-full hover:text-purple-400 bg-purple-400 dark:text-gray-900 text-purple-50 dark:hover:text-purple-50'
|
className={clsx(
|
||||||
)}
|
'p-1 rounded transition-colors duration-100 w-full hover:text-purple-400 bg-purple-400 dark:text-gray-900 text-purple-50 dark:hover:text-purple-50'
|
||||||
onClick={onCopySeed}
|
)}
|
||||||
>
|
onClick={onCopySeed}
|
||||||
<KeyIcon className="h-full" />
|
>
|
||||||
</button>
|
<KeyIcon className="h-full" />
|
||||||
<button
|
</button>
|
||||||
className={clsx(
|
</li>
|
||||||
'p-1 rounded transition-colors duration-100 w-full hover:text-purple-400 bg-purple-400 dark:text-gray-900 text-purple-50 dark:hover:text-purple-50'
|
{/* <li>
|
||||||
)}
|
<button
|
||||||
onClick={() => {
|
className={clsx(
|
||||||
// todo
|
'p-1 rounded transition-colors duration-100 w-full hover:text-purple-400 bg-purple-400 dark:text-gray-900 text-purple-50 dark:hover:text-purple-50'
|
||||||
}}
|
)}
|
||||||
>
|
onClick={() => {
|
||||||
<LibraryIcon className="h-full" />
|
// todo
|
||||||
</button>
|
}}
|
||||||
<button
|
>
|
||||||
className={clsx(
|
<LibraryIcon className="h-full" />
|
||||||
'p-1 rounded transition-colors duration-100 w-full hover:text-purple-400 bg-purple-400 dark:text-gray-900 text-purple-50 dark:hover:text-purple-50'
|
</button>
|
||||||
)}
|
</li>
|
||||||
onClick={onCopySeed}
|
<li>
|
||||||
>
|
<button
|
||||||
<UsersIcon className="h-full" />
|
className={clsx(
|
||||||
</button>
|
'p-1 rounded transition-colors duration-100 w-full hover:text-purple-400 bg-purple-400 dark:text-gray-900 text-purple-50 dark:hover:text-purple-50'
|
||||||
|
)}
|
||||||
|
onClick={onCopySeed}
|
||||||
|
>
|
||||||
|
<UsersIcon className="h-full" />
|
||||||
|
</button>
|
||||||
|
</li> */}
|
||||||
</ul>
|
</ul>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
Reference in a new issue