diff --git a/src/components/common/EditableInputBox.tsx b/src/components/common/EditableInputBox.tsx index 56a6fcb..1c65e89 100644 --- a/src/components/common/EditableInputBox.tsx +++ b/src/components/common/EditableInputBox.tsx @@ -65,7 +65,7 @@ export default function EditableInputBox({ `; return ( -
+
{label &&

{label}

}
diff --git a/src/components/common/ToggleSwitch.tsx b/src/components/common/ToggleSwitch.tsx index 8108a49..83e7015 100644 --- a/src/components/common/ToggleSwitch.tsx +++ b/src/components/common/ToggleSwitch.tsx @@ -1,7 +1,5 @@ -//setting - ON, OFF Toggle Switch import { useEffect, useState } from 'react'; -// Props 정의 interface IToggleSwitchProps { value?: boolean; onChange?: (val: boolean) => void; @@ -11,17 +9,14 @@ interface IToggleSwitchProps { } export default function ToggleSwitch({ value, onChange, onLabel = 'ON', offLabel = 'OFF', className = '' }: IToggleSwitchProps) { - // 내부 상태 관리 (초깃값은 props.value, 없으면 false) const [isOn, setIsOn] = useState(value ?? false); - // 외부에서 value가 바뀌면 내부 상태도 동기화 useEffect(() => { if (value !== undefined) { setIsOn(value); } }, [value]); - // 버튼 클릭 시 상태 토글 const handleToggle = () => { const next = !isOn; setIsOn(next); @@ -31,32 +26,22 @@ export default function ToggleSwitch({ value, onChange, onLabel = 'ON', offLabel return ( ); diff --git a/src/components/layout/MobileMenu.tsx b/src/components/layout/MobileMenu.tsx index 6fe19e3..c0373ca 100644 --- a/src/components/layout/MobileMenu.tsx +++ b/src/components/layout/MobileMenu.tsx @@ -12,7 +12,7 @@ interface IMobileMenuProps { export default function MobileMenu({ onClose, onOpenSettings }: IMobileMenuProps) { return ( <> - {/* 검정 반투명 배경 오버레이 */} + {/* 배경 오버레이 */}
{/* 사이드 메뉴 */} diff --git a/src/components/modal/SettingModal.tsx b/src/components/modal/SettingModal.tsx index 7164c2e..2e1fd56 100644 --- a/src/components/modal/SettingModal.tsx +++ b/src/components/modal/SettingModal.tsx @@ -23,7 +23,7 @@ export default function SettingsModal({ onClose, defaultTab = '알람' }: ISetti return ( {/* 좌측 탭 메뉴 */} -
+
{['알람', '멤버십', '정보'].map((tab) => (