mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-26 04:17:14 +00:00
Pass object instead of array in context provider
This commit is contained in:
@@ -6,8 +6,10 @@ import { skeleton } from '../../helpers/utils';
|
||||
import config from '../../ezprofile.config';
|
||||
|
||||
const ThemeChanger = () => {
|
||||
const [theme, setTheme] = useContext(ThemeContext);
|
||||
const [loading] = useContext(LoadingContext);
|
||||
const { theme, setTheme } = useContext(ThemeContext);
|
||||
const { loading } = useContext(LoadingContext);
|
||||
|
||||
console.log(theme);
|
||||
|
||||
const changeTheme = (e, selectedTheme) => {
|
||||
e.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user