From 0cc8b6b4975ac859284191438bbed0bc11b659ab Mon Sep 17 00:00:00 2001 From: gahusb Date: Sat, 16 May 2026 05:29:20 +0900 Subject: [PATCH] =?UTF-8?q?feat(gyeol):=20Q6Step=20(=EC=9E=90=EC=9C=A0=20?= =?UTF-8?q?=EC=9D=98=EA=B2=AC=20textarea)=20+=20Q7Step=20(=EC=9D=B4?= =?UTF-8?q?=EB=A9=94=EC=9D=BC=20=EC=98=B5=EC=85=98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Q6: 1000자 textarea, 빈 칸 허용 (skippable) - Q7: yes/no 라디오 + yes 선택 시 이메일 입력 노출 + 형식 validation - Q7 onSubmit = 최종 제출 트리거 (page.tsx에서 POST /api/survey) Co-Authored-By: Claude Opus 4.7 (1M context) --- app/gyeol/components/Q6Step.tsx | 34 +++++++++++ app/gyeol/components/Q7Step.tsx | 105 ++++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 app/gyeol/components/Q6Step.tsx create mode 100644 app/gyeol/components/Q7Step.tsx diff --git a/app/gyeol/components/Q6Step.tsx b/app/gyeol/components/Q6Step.tsx new file mode 100644 index 0000000..eacae35 --- /dev/null +++ b/app/gyeol/components/Q6Step.tsx @@ -0,0 +1,34 @@ +'use client'; + +import { useState } from 'react'; +import type { SurveyResponse } from '@/lib/survey/types'; +import QuestionLayout from './QuestionLayout'; + +interface Props { + initial: Partial; + onPrev: () => void; + onNext: (partial: Partial) => void; +} + +export default function Q6Step({ initial, onPrev, onNext }: Props) { + const [text, setText] = useState(initial.free_opinion ?? ''); + + // 빈 칸 허용 (skippable) + return ( + onNext({ free_opinion: text.trim() || undefined })} + > +