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 { Button, Chip, GlassCard } from '@/shared/ui';
@@ -21,8 +20,6 @@ export const StartRitualWidget = ({
onQuickEnter,
onOpenCustomEntry,
}: StartRitualWidgetProps) => {
const [isGoalOpen, setGoalOpen] = useState(true);
return (
<GlassCard elevated className="space-y-5 p-5 sm:p-6">
<div>
@@ -33,41 +30,26 @@ export const StartRitualWidget = ({
</div>
<section className="space-y-3">
<div className="flex items-center justify-between">
<label className="block text-xs font-medium uppercase tracking-[0.13em] text-white/65">
()
</label>
<button
type="button"
onClick={() => setGoalOpen((current) => !current)}
className="text-xs text-white/62 transition hover:text-white"
>
{isGoalOpen ? '접기' : '펼치기'}
</button>
</div>
<div className="space-y-3">
<input
value={goalInput}
onChange={(event) => onGoalInputChange(event.target.value)}
placeholder="이번 세션 딱 1가지만 (예: 견적서 1페이지)"
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"
/>
{isGoalOpen ? (
<div className="space-y-3">
<input
value={goalInput}
onChange={(event) => onGoalInputChange(event.target.value)}
placeholder="이번 세션 딱 1가지만 (예: 견적서 1페이지)"
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"
/>
<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 className="flex flex-wrap gap-2">
{goalChips.map((chip) => (
<Chip
key={chip.id}
active={selectedGoalId === chip.id}
onClick={() => onGoalChipSelect(chip)}
>
{chip.label}
</Chip>
))}
</div>
) : null}
</div>
</section>
<section className="space-y-3">