add copy to clipboard 2
This commit is contained in:
parent
9b9ce916e3
commit
6d097a44dd
@ -228,16 +228,35 @@ export default function Header() {
|
|||||||
</div>
|
</div>
|
||||||
</DropdownMenuLabel>
|
</DropdownMenuLabel>
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
|
{user.wallet !== undefined && (
|
||||||
|
<DropdownMenuItem
|
||||||
|
asChild
|
||||||
|
className="focus:bg-accent focus:text-primary"
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
variant={"ghost"}
|
||||||
|
className="flex-start w-full"
|
||||||
|
onClick={() => {
|
||||||
|
navigator.clipboard.writeText(user.wallet!.address);
|
||||||
|
toast.info("Copied to clipboard!");
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Copy />
|
||||||
|
Copy wallet code
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuItem>
|
||||||
|
)}
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
logout();
|
logout();
|
||||||
toast.success("You have been signed out");
|
toast.success("You have been signed out");
|
||||||
}}
|
}}
|
||||||
asChild
|
asChild
|
||||||
|
className="focus:bg-accent focus:text-primary"
|
||||||
>
|
>
|
||||||
<Button variant={"ghost"} className="w-full text-primary ">
|
<Button variant={"ghost"} className="flex-start w-full">
|
||||||
<LogOut />
|
<LogOut />
|
||||||
Log out
|
Sign out
|
||||||
</Button>
|
</Button>
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user