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} ); };