Skip to content

Commit 1e5043b

Browse files
committed
계정 설정 부분 외형 및 언어에서 테마 설정 색상 변경
1 parent d977031 commit 1e5043b

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

src/app/pages/SettingsPage.tsx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { useState } from "react";
22
import { motion } from "motion/react";
3-
import { Bell, Shield, Palette, Globe, Save } from "lucide-react";
3+
import { Bell, Shield, Palette, Save } from "lucide-react";
44
import { useTheme } from "../contexts/ThemeContext";
55
import { useLanguage, type LanguageType } from "../contexts/LanguageContext";
66

77
export function SettingsPage() {
8-
const { colors } = useTheme();
8+
const { colors, theme, setTheme } = useTheme();
99
const { language, setLanguage } = useLanguage();
1010
const [settings, setSettings] = useState({
1111
notifications: {
@@ -21,7 +21,7 @@ export function SettingsPage() {
2121
emailVisibility: false
2222
},
2323
appearance: {
24-
theme: 'dark',
24+
theme,
2525
language
2626
}
2727
});
@@ -279,10 +279,14 @@ export function SettingsPage() {
279279
</label>
280280
<select
281281
value={settings.appearance.theme}
282-
onChange={(e) => setSettings({
283-
...settings,
284-
appearance: { ...settings.appearance, theme: e.target.value }
285-
})}
282+
onChange={(e) => {
283+
const nextTheme = e.target.value as typeof theme;
284+
setTheme(nextTheme);
285+
setSettings({
286+
...settings,
287+
appearance: { ...settings.appearance, theme: nextTheme }
288+
});
289+
}}
286290
className="w-full px-4 py-3 rounded-xl border-0 tracking-tight cursor-pointer"
287291
style={{
288292
background: 'rgba(5, 11, 20, 0.6)',
@@ -292,9 +296,8 @@ export function SettingsPage() {
292296
fontWeight: 700
293297
}}
294298
>
295-
<option value="dark">다크 모드</option>
296-
<option value="light">라이트 모드</option>
297-
<option value="auto">시스템 설정</option>
299+
<option value="cyan">블루 모드</option>
300+
<option value="green">그린 모드</option>
298301
</select>
299302
</div>
300303

0 commit comments

Comments
 (0)