fix(pop-text): 시간/날짜 실시간 업데이트 자동 적용 및 라벨 수정

- 실시간 업데이트 스위치 UI 제거 (datetime 타입은 항상 실시간)
- "날짜/시간 설정" → "시간/날짜 설정" 라벨 변경

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
shin 2026-02-11 11:00:27 +09:00
parent 929cfb2b61
commit bae50ffda1
1 changed files with 3 additions and 13 deletions

View File

@ -265,15 +265,14 @@ function DateTimePreview({ config }: { config?: PopTextConfig }) {
);
}
// 시간/날짜 (실시간 지원)
// 시간/날짜 (항상 실시간)
function DateTimeDisplay({ config }: { config?: PopTextConfig }) {
const [now, setNow] = useState(new Date());
useEffect(() => {
if (!config?.isRealtime) return;
const timer = setInterval(() => setNow(new Date()), 1000);
return () => clearInterval(timer);
}, [config?.isRealtime]);
}, []);
// 빌더 설정 또는 기존 dateFormat 사용 (하위 호환)
const dateFormat = config?.dateTimeConfig
@ -455,19 +454,10 @@ export function PopTextConfigPanel({
{textType === "datetime" && (
<>
<SectionDivider label="날짜/시간 설정" />
<SectionDivider label="시간/날짜 설정" />
{/* 포맷 빌더 UI */}
<DateTimeFormatBuilder config={config} onUpdate={onUpdate} />
{/* 실시간 업데이트 */}
<div className="flex items-center gap-2">
<Switch
checked={config?.isRealtime ?? true}
onCheckedChange={(v) => onUpdate({ ...config, isRealtime: v })}
/>
<Label className="text-xs"> </Label>
</div>
<SectionDivider label="스타일 설정" />
<FontSizeSelect config={config} onUpdate={onUpdate} />
<AlignmentSelect config={config} onUpdate={onUpdate} />