Pass object instead of array in context provider

This commit is contained in:
Ariful Alam
2022-03-19 16:16:47 +06:00
parent 2b94b40bf3
commit b69ced8ce0
10 changed files with 15 additions and 13 deletions

View File

@@ -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();