implement page controller

This commit is contained in:
Amruth Pillai
2020-04-01 12:47:17 +05:30
parent 3a9a0dc811
commit ad9105f4a4
12 changed files with 208 additions and 60 deletions

View File

@ -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}