fix: button hydration 에러 수정

This commit is contained in:
2026-02-28 23:20:34 +09:00
parent 9c6c01a3b2
commit 3679f4bb40

View File

@@ -1,4 +1,3 @@
import { useState } from 'react';
import type { GoalChip } from '@/entities/session'; import type { GoalChip } from '@/entities/session';
import { Button, Chip, GlassCard } from '@/shared/ui'; import { Button, Chip, GlassCard } from '@/shared/ui';
@@ -21,8 +20,6 @@ export const StartRitualWidget = ({
onQuickEnter, onQuickEnter,
onOpenCustomEntry, onOpenCustomEntry,
}: StartRitualWidgetProps) => { }: StartRitualWidgetProps) => {
const [isGoalOpen, setGoalOpen] = useState(true);
return ( return (
<GlassCard elevated className="space-y-5 p-5 sm:p-6"> <GlassCard elevated className="space-y-5 p-5 sm:p-6">
<div> <div>
@@ -33,41 +30,26 @@ export const StartRitualWidget = ({
</div> </div>
<section className="space-y-3"> <section className="space-y-3">
<div className="flex items-center justify-between"> <div className="space-y-3">
<label className="block text-xs font-medium uppercase tracking-[0.13em] text-white/65"> <input
() value={goalInput}
</label> onChange={(event) => onGoalInputChange(event.target.value)}
<button placeholder="이번 세션 딱 1가지만 (예: 견적서 1페이지)"
type="button" className="w-full rounded-xl border border-white/20 bg-slate-950/55 px-3.5 py-3 text-sm text-white placeholder:text-white/45 focus:border-sky-200/60 focus:outline-none"
onClick={() => setGoalOpen((current) => !current)} />
className="text-xs text-white/62 transition hover:text-white"
>
{isGoalOpen ? '접기' : '펼치기'}
</button>
</div>
{isGoalOpen ? ( <div className="flex flex-wrap gap-2">
<div className="space-y-3"> {goalChips.map((chip) => (
<input <Chip
value={goalInput} key={chip.id}
onChange={(event) => onGoalInputChange(event.target.value)} active={selectedGoalId === chip.id}
placeholder="이번 세션 딱 1가지만 (예: 견적서 1페이지)" onClick={() => onGoalChipSelect(chip)}
className="w-full rounded-xl border border-white/20 bg-slate-950/55 px-3.5 py-3 text-sm text-white placeholder:text-white/45 focus:border-sky-200/60 focus:outline-none" >
/> {chip.label}
</Chip>
<div className="flex flex-wrap gap-2"> ))}
{goalChips.map((chip) => (
<Chip
key={chip.id}
active={selectedGoalId === chip.id}
onClick={() => onGoalChipSelect(chip)}
>
{chip.label}
</Chip>
))}
</div>
</div> </div>
) : null} </div>
</section> </section>
<section className="space-y-3"> <section className="space-y-3">