Skip to content

Commit

Permalink
fixed ToS progress bar bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
ES-Legacy committed Nov 10, 2023
1 parent 49b32a3 commit 087852b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions components/ui/useCode/StepOne.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export function StepOne() {
message: "Invalid email address.",
})
.default(email),

accept: z
.literal<boolean>(true, {
errorMap: () => ({
Expand Down
2 changes: 1 addition & 1 deletion components/ui/useCode/Stepper-Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function StepperForm() {

useEffect(() => {
setChallenge("");
setCheck(true);
setCheck(false);
setEmail("");
setProgress(0);
setStep(1);
Expand Down
6 changes: 3 additions & 3 deletions components/ui/useCode/TOS-FormField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ export function TOSFormField(form: any) {
<FormControl>
<div className='flex'>
<Input
defaultChecked={false}
defaultChecked={check}
type='checkbox'
checked={field.value}
onChange={field.onChange}
onClick={() => {
setCheck(!check);
setProgress(
check
? progress + progressIncrements
: progress - progressIncrements
? progress - progressIncrements
: progress + progressIncrements
);
}}
className='peer mr-[10px] mt-[5px] h-4 w-[20px] cursor-pointer'
Expand Down

0 comments on commit 087852b

Please sign in to comment.