Skip to content

Commit

Permalink
removed submitting component as it's unneccary and should be removed
Browse files Browse the repository at this point in the history
  • Loading branch information
ES-Legacy committed Nov 6, 2023
1 parent 5c515cd commit 13cf784
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
7 changes: 5 additions & 2 deletions components/ui/useCode/StepOne.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from "@/data-store/stepper-store";
import { EmailFormField } from "./Email-FormField";
import { TOSFormField } from "./TOS-FormField";
import { FormSubmitting } from "./Submitting";
import { Loader2 } from "lucide-react";

export function StepOne() {
const { progress, setProgress, step, setStep, email, setEmail, setCheck } =
Expand Down Expand Up @@ -58,7 +58,10 @@ export function StepOne() {
<TOSFormField />

{form.formState.isSubmitting ? (
<FormSubmitting />
<Button disabled>
<Loader2 className='mr-2 h-4 w-4 animate-spin' />
Submitting...
</Button>
) : (
<Button
type='submit'
Expand Down
7 changes: 5 additions & 2 deletions components/ui/useCode/StepTwo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import {
progressIncrements,
useStepperStore,
} from "@/data-store/stepper-store";
import { FormSubmitting } from "./Submitting";
import useSessionStore from "@/data-store/session-store";
import LandingPageCode from "@/components/landing/test-challenges/placeholder-code";
import { useRouter } from "next/navigation";
import { ChallengeFormField } from "./Challenge-FormField";
import { Loader2 } from "lucide-react";

const formStepTwoSchema = z.object({
challenge: z.enum(
Expand Down Expand Up @@ -67,7 +67,10 @@ export function StepTwo() {
Previous
</Button>
{form.formState.isSubmitting ? (
<FormSubmitting />
<Button disabled>
<Loader2 className='mr-2 h-4 w-4 animate-spin' />
Submitting...
</Button>
) : (
<Button
type='submit'
Expand Down
11 changes: 0 additions & 11 deletions components/ui/useCode/Submitting.tsx

This file was deleted.

0 comments on commit 13cf784

Please sign in to comment.