mirror of
https://github.com/movie-web/movie-web.git
synced 2025-01-08 22:50:42 +01:00
21 lines
564 B
TypeScript
21 lines
564 B
TypeScript
import { useMemo } from "react";
|
|
|
|
import { genMnemonic } from "@/backend/accounts/crypto";
|
|
import { Button } from "@/components/Button";
|
|
|
|
interface PassphraseGeneratePartProps {
|
|
onNext?: (mnemonic: string) => void;
|
|
}
|
|
|
|
export function PassphraseGeneratePart(props: PassphraseGeneratePartProps) {
|
|
const mnemonic = useMemo(() => genMnemonic(), []);
|
|
|
|
return (
|
|
<div>
|
|
<p>Remeber the following passphrase:</p>
|
|
<p className="border rounded-xl p-2">{mnemonic}</p>
|
|
<Button onClick={() => props.onNext?.(mnemonic)}>Next</Button>
|
|
</div>
|
|
);
|
|
}
|