update set password flow
This commit is contained in:
@@ -9,15 +9,14 @@ import { Button } from '@shared/button';
|
||||
import { EyeOffIcon, EyeOnIcon, LoaderIcon } from '@shared/icons';
|
||||
|
||||
import { useOnboarding } from '@stores/onboarding';
|
||||
import { useStronghold } from '@stores/stronghold';
|
||||
|
||||
export function CreateStep1Screen() {
|
||||
const navigate = useNavigate();
|
||||
const queryClient = useQueryClient();
|
||||
const navigate = useNavigate();
|
||||
const setPrivkey = useStronghold((state) => state.setPrivkey);
|
||||
const setPubkey = useOnboarding((state) => state.setPubkey);
|
||||
|
||||
const [setPubkey, setPrivkey] = useOnboarding((state) => [
|
||||
state.setPubkey,
|
||||
state.setPrivkey,
|
||||
]);
|
||||
const [privkeyInput, setPrivkeyInput] = useState('password');
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
|
||||
@@ -29,11 +29,15 @@ const resolver: Resolver<FormValues> = async (values) => {
|
||||
|
||||
export function CreateStep2Screen() {
|
||||
const navigate = useNavigate();
|
||||
const setPassword = useStronghold((state) => state.setPassword);
|
||||
|
||||
const [pubkey, privkey] = useOnboarding((state) => [state.pubkey, state.privkey]);
|
||||
const [passwordInput, setPasswordInput] = useState('password');
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [privkey, setPassword] = useStronghold((state) => [
|
||||
state.privkey,
|
||||
state.setPassword,
|
||||
]);
|
||||
|
||||
const pubkey = useOnboarding((state) => state.privkey);
|
||||
|
||||
const { save } = useSecureStorage();
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ export function CreateStep5Screen() {
|
||||
}
|
||||
};
|
||||
|
||||
const list = data ? data.profiles.concat(INITIAL_LIST) : [];
|
||||
const list = data ? data.profiles.concat(INITIAL_LIST) : INITIAL_LIST;
|
||||
|
||||
return (
|
||||
<div className="mx-auto w-full max-w-md">
|
||||
|
||||
Reference in New Issue
Block a user