feat: add zap setup screen

This commit is contained in:
2024-03-10 16:39:23 +07:00
parent 0c4b309a11
commit bb6badfed6
17 changed files with 121 additions and 248 deletions

View File

@@ -11,19 +11,15 @@ export function LoginDialog() {
const [nsec, setNsec] = useState("");
const [passphase, setPassphase] = useState("");
const [loading, setLoading] = useState(false);
const login = async () => {
try {
setLoading(true);
const save = await ark.save_account(nsec, passphase);
if (save) {
navigate({ to: "/", search: { guest: false } });
}
} catch (e) {
setLoading(false);
toast.error(String(e));
}
};