diff --git a/src/app/(app)/(layout)/temp/recover/page.tsx b/src/app/(public)/temp/recover/page.tsx similarity index 87% rename from src/app/(app)/(layout)/temp/recover/page.tsx rename to src/app/(public)/temp/recover/page.tsx index 640d2488..ea171b1b 100644 --- a/src/app/(app)/(layout)/temp/recover/page.tsx +++ b/src/app/(public)/temp/recover/page.tsx @@ -2,18 +2,15 @@ import { hexToBytes } from '@noble/hashes/utils'; import { nip44 } from 'nostr-tools'; -import { useCallback, useEffect, useState } from 'react'; +import { useCallback, useState } from 'react'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { useToast } from '@/components/ui/use-toast'; -import { useUserQuery } from '@/graphql/queries/__generated__/user.generated'; import { generateMasterKeyAndHash } from '@/utils/crypto'; export default function Page() { - const { data } = useUserQuery(); - const { toast } = useToast(); const [email, setEmail] = useState(''); @@ -22,12 +19,6 @@ export default function Page() { const [mnemonic, setMnemonic] = useState(''); const [loading, setLoading] = useState(false); - useEffect(() => { - if (!!email) return; - if (!data?.user.email) return; - setEmail(data.user.email); - }, [data, email]); - const decrypt = useCallback(async () => { if (loading) return; @@ -56,7 +47,8 @@ export default function Page() { }, [email, loading, password, protectedMnemonic, toast]); return ( -
+
+

Recover your Mnemonic