From 2455dd982b4edaa75625770a75f2d3828233e26f Mon Sep 17 00:00:00 2001 From: nabarun Date: Wed, 7 Aug 2024 11:39:10 +0000 Subject: [PATCH] Add button to copy mnemonic after creating new wallet (#9) Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675) Co-authored-by: IshaVenikar Reviewed-on: https://git.vdb.to/cerc-io/laconic-wallet-web/pulls/9 --- src/components/Dialog.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Dialog.tsx b/src/components/Dialog.tsx index 63124e7..d907e27 100644 --- a/src/components/Dialog.tsx +++ b/src/components/Dialog.tsx @@ -5,10 +5,13 @@ import styles from '../styles/stylesheet'; import GridView from './Grid'; import { CustomDialogProps } from '../types'; - const DialogComponent = ({ visible, hideDialog, contentText }: CustomDialogProps) => { const words = contentText.split(' '); + const copyMnemonic = () => { + navigator.clipboard.writeText(contentText) + }; + return ( Mnemonic @@ -22,6 +25,7 @@ const DialogComponent = ({ visible, hideDialog, contentText }: CustomDialogProps +