diff --git a/.husky/pre-commit b/.husky/pre-commit index d24fdfc6..43afca28 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,5 @@ #!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" +#. "$(dirname -- "$0")/_/husky.sh" -npx lint-staged +#npx lint-staged +#npx prettier --write diff --git a/app/(app)/alpha/additional-details/_actions.ts b/app/(app)/alpha/additional-details/_actions.ts index cf2a81f5..78d300d3 100644 --- a/app/(app)/alpha/additional-details/_actions.ts +++ b/app/(app)/alpha/additional-details/_actions.ts @@ -16,7 +16,7 @@ import { db } from "@/server/db"; import { user } from "@/server/db/schema"; import { eq } from "drizzle-orm"; -export async function handleFormSlideOneSubmit(dataInput: TypeSlideOneSchema) { +export async function slideOneSubmitAction(dataInput: TypeSlideOneSchema) { const session = await getServerAuthSession(); if (!session || !session.user) { redirect("/get-started"); @@ -47,7 +47,7 @@ export async function handleFormSlideOneSubmit(dataInput: TypeSlideOneSchema) { } } -export async function handleFormSlideTwoSubmit(dataInput: TypeSlideTwoSchema) { +export async function slideTwoSubmitAction(dataInput: TypeSlideTwoSchema) { const session = await getServerAuthSession(); if (!session || !session.user) { redirect("/get-started"); @@ -75,9 +75,7 @@ export async function handleFormSlideTwoSubmit(dataInput: TypeSlideTwoSchema) { } } -export async function handleFormSlideThreeSubmit( - dataInput: TypeSlideThreeSchema, -) { +export async function slideThreeSubmitAction(dataInput: TypeSlideThreeSchema) { const session = await getServerAuthSession(); if (!session || !session.user) { redirect("/get-started"); diff --git a/app/(app)/alpha/additional-details/_client.tsx b/app/(app)/alpha/additional-details/_client.tsx index 635742f3..bfe580ac 100644 --- a/app/(app)/alpha/additional-details/_client.tsx +++ b/app/(app)/alpha/additional-details/_client.tsx @@ -23,10 +23,22 @@ import { monthsOptions, } from "@/app/(app)/alpha/additional-details/selectOptions"; import { - handleFormSlideOneSubmit, - handleFormSlideThreeSubmit, - handleFormSlideTwoSubmit, + slideOneSubmitAction, + slideThreeSubmitAction, + slideTwoSubmitAction, } from "./_actions"; +import { Heading, Subheading } from "../../../../components/Catalyst/heading"; +import { Divider } from "../../../../components/Catalyst/divider"; +import { + ErrorMessage, + Field, + Fieldset, + Label, + Legend, +} from "../../../../components/Catalyst/fieldset"; +import { Input } from "../../../../components/Catalyst/input"; +import { Select } from "../../../../components/Catalyst/select"; +import { Button } from "../../../../components/Catalyst/button"; type UserDetails = { username: string; @@ -103,7 +115,7 @@ function SlideOne({ details }: { details: UserDetails }) { const onFormSubmit = async (data: TypeSlideOneSchema) => { try { - const isSuccess = await handleFormSlideOneSubmit(data); + const isSuccess = await slideOneSubmitAction(data); if (isSuccess) { toast.success("Saved"); router.push(`?slide=${2}`, { scroll: false }); @@ -116,107 +128,101 @@ function SlideOne({ details }: { details: UserDetails }) { }; return ( -