From 878597eb1e82ac97b813102039aabe6034772e85 Mon Sep 17 00:00:00 2001 From: lshyun955 Date: Fri, 3 Jan 2025 12:49:18 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EC=A0=95:=20=EB=AA=85=ED=99=95?= =?UTF-8?q?=ED=95=9C=20=EB=B3=80=EC=88=98=EB=AA=85=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/context/Auth/AuthContext.tsx | 6 ++---- src/context/Item/ItemContex.tsx | 6 ++---- src/context/Theme/ThemeContext.tsx | 9 ++++++--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/context/Auth/AuthContext.tsx b/src/context/Auth/AuthContext.tsx index 3ddeec5..f7ed027 100644 --- a/src/context/Auth/AuthContext.tsx +++ b/src/context/Auth/AuthContext.tsx @@ -25,7 +25,7 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => { addNotification("로그아웃되었습니다", "info"); }, [addNotification]); - const authInfo: AuthContextType = useMemo(() => { + const value: AuthContextType = useMemo(() => { return { user, login, @@ -33,7 +33,5 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => { }; }, [user, login, logout]); - return ( - {children} - ); + return {children}; }; diff --git a/src/context/Item/ItemContex.tsx b/src/context/Item/ItemContex.tsx index 460fc7e..8a5da66 100644 --- a/src/context/Item/ItemContex.tsx +++ b/src/context/Item/ItemContex.tsx @@ -16,11 +16,9 @@ export const ItemProvider = ({ children }: { children: React.ReactNode }) => { ]); }; - const itemInfo: ItemContextType = { + const value: ItemContextType = { items, addItems, }; - return ( - {children} - ); + return {children}; }; diff --git a/src/context/Theme/ThemeContext.tsx b/src/context/Theme/ThemeContext.tsx index c691c01..807c599 100644 --- a/src/context/Theme/ThemeContext.tsx +++ b/src/context/Theme/ThemeContext.tsx @@ -13,9 +13,12 @@ export const ThemeProvider = ({ children }: { children: React.ReactNode }) => { const CurrentTheme = theme === "light" ? "dark" : "light"; setTheme(CurrentTheme); }; + + const value: ThemeContextType = { + theme, + toggleTheme, + }; return ( - - {children} - + {children} ); };