diff --git a/src/components/ImportWalletDialog.tsx b/src/components/ImportWalletDialog.tsx index f192eb7..e081035 100644 --- a/src/components/ImportWalletDialog.tsx +++ b/src/components/ImportWalletDialog.tsx @@ -1,17 +1,26 @@ -import React, { useEffect, useState } from 'react'; - -import { Dialog, DialogActions, DialogContent, DialogTitle, TextField, Grid, Button, Typography } from "@mui/material"; +import React, { useEffect, useState } from "react"; +import styles from "../styles/stylesheet"; +import { + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TextField, + Grid, + Button, + Typography, +} from "@mui/material"; const ImportWalletDialog = ({ visible, hideDialog, - importWalletHandler + importWalletHandler, }: { visible: boolean; hideDialog: () => void; importWalletHandler: (recoveryPhrase: string) => Promise; }) => { - const [words, setWords] = useState(Array(12).fill('')); + const [words, setWords] = useState(Array(12).fill("")); const handleWordChange = (index: number, value: string) => { const newWords = [...words]; @@ -20,7 +29,7 @@ const ImportWalletDialog = ({ }; const handlePaste = (event: React.ClipboardEvent) => { - const pastedText = event.clipboardData.getData('Text'); + const pastedText = event.clipboardData.getData("Text"); const splitWords = pastedText.trim().split(/\s+/); if (splitWords.length === 12) { @@ -30,15 +39,17 @@ const ImportWalletDialog = ({ }; useEffect(() => { - setWords(Array(12).fill('')); - },[visible]); + setWords(Array(12).fill("")); + }, [visible]); return ( - Import your wallet from your mnemonic - - - (You can paste your entire mnemonic into the first textbox) + + Import your wallet from your mnemonic + + + + (You can paste your entire mnemonic into the first textbox) {words.map((word, index) => ( @@ -55,9 +66,16 @@ const ImportWalletDialog = ({ ))} - - - + + + );