File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
infrastructure/eid-wallet/src/routes/(auth)/register Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 10
10
let showDrawer = $state (false );
11
11
let isBiometricScreen = $state (false );
12
12
let isBiometricsAdded = $state (false );
13
+ let isError = $state (false );
13
14
14
15
const handleFirstStep = async () => {
15
16
if (pin .length === 4 ) firstStep = false ;
42
43
// handle logic when biometrics added successfully
43
44
goto (" /review" );
44
45
}
46
+
47
+ $effect (() => {
48
+ if (repeatPin && repeatPin .length === 4 && pin !== repeatPin ) isError = true ;
49
+ else isError = false ;
50
+ })
45
51
</script >
46
52
47
53
{#if firstStep }
58
64
<section >
59
65
<h1 class =" text-3xl text-black font-semibold mb-[1vh]" >Re-enter your pin</h1 >
60
66
<p class =" text-base text-black-700 font-normal mb-[14vh]" >Confirm by entering pin again</p >
61
- <InputPin bind:pin ={repeatPin }/>
67
+ <InputPin bind:pin ={repeatPin } {isError }/>
68
+ <p class ={` text-base font-normal text-red-900 mt-[3.4vh] ${isError ? " block" : " hidden" } ` }>Your PIN does not match, try again.</p >
62
69
</section >
63
70
<ButtonAction class ="w-full" callback ={handleConfirm }>Confirm</ButtonAction >
64
71
</main >
You can’t perform that action at this time.
0 commit comments