import { useMemory } from "@/app/providers/MemoryProvider/useMemory"; import { Flex, Text, Transition } from "@mantine/core"; import { useEffect, useState } from "react"; import { useNavigate } from "react-router-dom"; import { IconChevronRight } from "@tabler/icons-react"; import { InputChainWords } from "@/app/components/InputChainWords/InputChainWords"; import wordlist from "web-bip39/wordlists/english"; import useWindow from "@/app/hooks/useWindow"; import { AnimatedButton } from "@/app/components/AnimatedButton/AnimatedButton"; import { AuthFlowBreadcrumbs } from "@/app/components/AuthFlowBreadcrumbs/AuthFlowBreadcrumbs"; export function ExistsSeed() { const navigate = useNavigate(); const [_, setPhrase] = useMemory("seed-phrase", "", true); const [passed, setPassed] = useState(false); const [words, setWords] = useState(""); const {setSize, setResizeble} = useWindow(); const [mounted, setMounted] = useState(false); useEffect(() => { setSize(385, 555); setResizeble(false); setTimeout(() => setMounted(true), 100); }, []); const onPassed = (words : string[]) => { setWords(words.join(" ")); setPassed(true); }; const onNotPassed = () => { setPassed(false); }; const onNextStep = () => { setPhrase(words); navigate('/set-password'); } return ( {(styles) => ( Enter your seed phrase that you generated or that was created when setting up your account )} {(styles) => ( i + 1 + "."} wordlist={wordlist} onPassed={onPassed} onNotPassed={onNotPassed} words={12}> )} {(styles) => ( } fullWidth disabled={!passed} onClick={() => onNextStep()} size={'md'} > Next step )} ); }