File indexing completed on 2025-01-26 05:27:59

0001 import React, {createContext,useState} from 'react';
0002 //import {metaheaderReducer} from '../reducers/metaheaderReducer';
0003 export const MetaheaderContext = createContext();
0004 
0005 const MetaheaderContextProvider = (props) => {
0006     //const [state, dispatch] = useReducer(metaheaderReducer,{...window.config});
0007     const [state, setState] = useState({...props.config})
0008     return (
0009         <MetaheaderContext.Provider value={{state, setState}}>
0010          {props.children}
0011         </MetaheaderContext.Provider>        
0012     )
0013 }
0014 export default MetaheaderContextProvider
0015 
0016 
0017 
0018