mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-15 01:01:43 +10:00
implement page controller
This commit is contained in:
@ -4,12 +4,16 @@ const PageContext = React.createContext(null);
|
||||
const { Provider } = PageContext;
|
||||
|
||||
const StateProvider = ({ children }) => {
|
||||
const [pageElement, setPageElement] = useState(null);
|
||||
const [panZoomRef, setPanZoomRef] = useState(null);
|
||||
const [pageRef, setPageRef] = useState(null);
|
||||
|
||||
return (
|
||||
<Provider
|
||||
value={{
|
||||
pageElement,
|
||||
setPageElement,
|
||||
pageRef,
|
||||
setPageRef,
|
||||
panZoomRef,
|
||||
setPanZoomRef,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user