From 27b3f7948ee314451e9d79a2a2ee9ebc4a597c33 Mon Sep 17 00:00:00 2001 From: gahusb Date: Sat, 16 May 2026 05:24:58 +0900 Subject: [PATCH] =?UTF-8?q?feat(gyeol):=20Q1Step=20(=EB=93=9C=EB=A1=AD?= =?UTF-8?q?=EB=8B=A4=EC=9A=B4)=20+=20Q2Step=20(=EB=9D=BC=EB=94=94=EC=98=A4?= =?UTF-8?q?=205)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Q1: 나이대 + 상황 두 드롭다운, 둘 다 선택 시 활성 - Q2: 자각 빈도 5 라디오, 보라 활성 스타일 - 라디오 패턴이 이후 Q4/Q5에서 재사용됨 Co-Authored-By: Claude Opus 4.7 (1M context) --- app/gyeol/components/Q1Step.tsx | 62 +++++++++++++++++++++++++++++++++ app/gyeol/components/Q2Step.tsx | 55 +++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 app/gyeol/components/Q1Step.tsx create mode 100644 app/gyeol/components/Q2Step.tsx diff --git a/app/gyeol/components/Q1Step.tsx b/app/gyeol/components/Q1Step.tsx new file mode 100644 index 0000000..f674035 --- /dev/null +++ b/app/gyeol/components/Q1Step.tsx @@ -0,0 +1,62 @@ +'use client'; + +import { useState } from 'react'; +import { AGE_RANGES, STATUSES } from '@/lib/survey/questions'; +import type { SurveyResponse } from '@/lib/survey/types'; +import QuestionLayout from './QuestionLayout'; + +interface Props { + initial: Partial; + onPrev: () => void; + onNext: (partial: Partial) => void; +} + +export default function Q1Step({ initial, onPrev, onNext }: Props) { + const [age, setAge] = useState(initial.age_range ?? ''); + const [status, setStatus] = useState(initial.status ?? ''); + + const valid = age && status; + + return ( + onNext({ age_range: age, status })} + nextDisabled={!valid} + > +
+
+ + +
+ +
+ + +
+
+
+ ); +} diff --git a/app/gyeol/components/Q2Step.tsx b/app/gyeol/components/Q2Step.tsx new file mode 100644 index 0000000..eb12012 --- /dev/null +++ b/app/gyeol/components/Q2Step.tsx @@ -0,0 +1,55 @@ +'use client'; + +import { useState } from 'react'; +import { AWARENESS_FREQS } from '@/lib/survey/questions'; +import type { SurveyResponse } from '@/lib/survey/types'; +import QuestionLayout from './QuestionLayout'; + +interface Props { + initial: Partial; + onPrev: () => void; + onNext: (partial: Partial) => void; +} + +export default function Q2Step({ initial, onPrev, onNext }: Props) { + const [value, setValue] = useState(initial.awareness_freq ?? ''); + + return ( + onNext({ awareness_freq: value })} + nextDisabled={!value} + > +
+ {AWARENESS_FREQS.map((option) => ( + + ))} +
+
+ ); +}