From c55bef8a794dc1d1c0e602786642c989b532c5ab Mon Sep 17 00:00:00 2001 From: Cheshier Date: Sun, 12 Nov 2023 20:28:02 +0900 Subject: [PATCH] =?UTF-8?q?Revert=20"=E2=9C=A8=20Feat(#141):=20=EC=8A=A4?= =?UTF-8?q?=ED=85=8C=EB=94=94=20=EC=83=9D=EC=84=B1=20API=20=EC=97=B0?= =?UTF-8?q?=EB=8F=99=20=EA=B5=AC=ED=98=84"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 - pnpm-lock.yaml | 3 - src/app/(steady)/steady/create/page.tsx | 351 +++++------------- .../(steady)/steady/create/questions/page.tsx | 75 +--- src/components/_common/Input/index.tsx | 13 +- .../_common/Selector/Date/index.tsx | 19 +- .../_common/Selector/Multi/index.tsx | 4 - .../_common/Selector/Single/index.tsx | 12 +- src/components/ui/form.tsx | 174 --------- src/components/ui/label.tsx | 25 -- src/constants/create-steady.ts | 57 ++- src/constants/schemas/steadySchema.ts | 41 -- src/services/steady/createSteady.ts | 17 - src/services/types/index.ts | 17 +- src/stores/createSteadyData.ts | 25 -- src/utils/extractValue.ts | 16 - src/utils/formatDate.ts | 6 - 17 files changed, 130 insertions(+), 726 deletions(-) delete mode 100644 src/components/ui/form.tsx delete mode 100644 src/components/ui/label.tsx delete mode 100644 src/constants/schemas/steadySchema.ts delete mode 100644 src/services/steady/createSteady.ts delete mode 100644 src/stores/createSteadyData.ts delete mode 100644 src/utils/extractValue.ts delete mode 100644 src/utils/formatDate.ts diff --git a/package.json b/package.json index 73dbb099..ddd75a11 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,6 @@ "@radix-ui/react-avatar": "^1.0.4", "@radix-ui/react-dropdown-menu": "^2.0.6", "@radix-ui/react-icons": "^1.3.0", - "@radix-ui/react-label": "^2.0.2", "@radix-ui/react-popover": "^1.0.7", "@radix-ui/react-scroll-area": "^1.0.5", "@radix-ui/react-select": "^2.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 86476237..e9c61f86 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,9 +17,6 @@ dependencies: '@radix-ui/react-icons': specifier: ^1.3.0 version: 1.3.0(react@18.0.0) - '@radix-ui/react-label': - specifier: ^2.0.2 - version: 2.0.2(@types/react-dom@18.0.0)(@types/react@18.0.0)(react-dom@18.0.0)(react@18.0.0) '@radix-ui/react-popover': specifier: ^1.0.7 version: 1.0.7(@types/react-dom@18.0.0)(@types/react@18.0.0)(react-dom@18.0.0)(react@18.0.0) diff --git a/src/app/(steady)/steady/create/page.tsx b/src/app/(steady)/steady/create/page.tsx index 69e3dd5c..facb8eeb 100644 --- a/src/app/(steady)/steady/create/page.tsx +++ b/src/app/(steady)/steady/create/page.tsx @@ -1,17 +1,6 @@ "use client"; -import { useForm } from "react-hook-form"; -import { useRouter } from "next/navigation"; -import { - Form, - FormControl, - FormField, - FormItem, - FormMessage, -} from "@/components/ui/form"; import { cn } from "@/lib/utils"; -import useCreateSteadyStore from "@/stores/createSteadyData"; -import { zodResolver } from "@hookform/resolvers/zod"; import { Separator, TextArea } from "@radix-ui/themes"; import Button, { buttonSize } from "@/components/_common/Button"; import Input from "@/components/_common/Input"; @@ -20,8 +9,6 @@ import { MultiSelector, SingleSelector, } from "@/components/_common/Selector"; -import { extractValue } from "@/utils/extractValue"; -import { formatDate } from "@/utils/formatDate"; import { RECRUITMENT_SECTION_INTRO, STEADY_RECRUITMENT_EXAMPLE, @@ -33,263 +20,105 @@ import { steadyRecruitmentFields, steadyRunningMethods, } from "@/constants/create-steady"; -import type { SteadyStateType } from "@/constants/schemas/steadySchema"; -import { SteadySchema } from "@/constants/schemas/steadySchema"; const CreateSteadyPage = () => { - const router = useRouter(); - const { setSteadyState } = useCreateSteadyStore(); - const steadyForm = useForm({ - resolver: zodResolver(SteadySchema), - }); - - const onSubmit = (data: SteadyStateType) => { - setSteadyState(data); - router.push("/steady/create/questions"); - }; - return (
-
- -

{STEADY_SECTION_INTRO}

- +

{STEADY_SECTION_INTRO}

+ +
+ -
- ( - - { - field.onChange(selected); - }} - /> - - - )} - /> - ( - - { - field.onChange(Number(selected)); - }} - /> - - - )} - /> -
- - ( - - - { - field.onChange(value); - }} - /> - - - - )} +
+ + +