refactor context wrapper
This commit is contained in:
parent
d54da3b878
commit
ab1a4c9801
2 changed files with 121 additions and 122 deletions
|
|
@ -18,7 +18,6 @@ import { TabsManager } from "./pages/FlowPage/flowManager";
|
||||||
export default function App() {
|
export default function App() {
|
||||||
var _ = require("lodash");
|
var _ = require("lodash");
|
||||||
|
|
||||||
|
|
||||||
let { setAtual, setShowSideBar, setIsStackedOpen } =
|
let { setAtual, setShowSideBar, setIsStackedOpen } =
|
||||||
useContext(locationContext);
|
useContext(locationContext);
|
||||||
let location = useLocation();
|
let location = useLocation();
|
||||||
|
|
@ -98,7 +97,6 @@ export default function App() {
|
||||||
return (
|
return (
|
||||||
//need parent component with width and height
|
//need parent component with width and height
|
||||||
<div className="h-full flex flex-col">
|
<div className="h-full flex flex-col">
|
||||||
|
|
||||||
<div className="flex grow-0 shrink basis-auto">
|
<div className="flex grow-0 shrink basis-auto">
|
||||||
<Header userNavigation={userNavigation} user={user}></Header>
|
<Header userNavigation={userNavigation} user={user}></Header>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import { TabsProvider } from "./tabsContext";
|
||||||
import { TypesProvider } from "./typesContext";
|
import { TypesProvider } from "./typesContext";
|
||||||
|
|
||||||
export default function ContextWrapper({ children }) {
|
export default function ContextWrapper({ children }) {
|
||||||
|
//element to wrap all context
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LocationProvider>
|
<LocationProvider>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue