Skip to content

Commit

Permalink
chore: make page public
Browse files Browse the repository at this point in the history
  • Loading branch information
apotdevin committed Jul 22, 2024
1 parent 190d0e6 commit e90bce1
Showing 1 changed file with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>('');
Expand All @@ -22,12 +19,6 @@ export default function Page() {
const [mnemonic, setMnemonic] = useState<string>('');
const [loading, setLoading] = useState<boolean>(false);

useEffect(() => {
if (!!email) return;
if (!data?.user.email) return;
setEmail(data.user.email);
}, [data, email]);

const decrypt = useCallback(async () => {
if (loading) return;

Expand Down Expand Up @@ -56,7 +47,8 @@ export default function Page() {
}, [email, loading, password, protectedMnemonic, toast]);

return (
<div className="my-4 flex flex-col gap-4">
<div className="my-4 flex w-full flex-col gap-4">
<h1 className="font-semibold">Recover your Mnemonic</h1>
<div>
<Label>Email</Label>
<Input
Expand Down

0 comments on commit e90bce1

Please sign in to comment.