- Improve product fruits wrapper for extra checks
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -23,7 +23,7 @@ import "./App.styles.scss";
|
|||||||
import handleBeta from "../utils/betaHandler";
|
import handleBeta from "../utils/betaHandler";
|
||||||
import Eula from "../components/eula/eula.component";
|
import Eula from "../components/eula/eula.component";
|
||||||
import InstanceRenderMgr from "../utils/instanceRenderMgr";
|
import InstanceRenderMgr from "../utils/instanceRenderMgr";
|
||||||
import { ProductFruits } from "react-product-fruits";
|
import ProductFruitsWrapper from "./ProductFruitsWrapper.jsx";
|
||||||
|
|
||||||
const ResetPassword = lazy(() => import("../pages/reset-password/reset-password.component"));
|
const ResetPassword = lazy(() => import("../pages/reset-password/reset-password.component"));
|
||||||
const ManagePage = lazy(() => import("../pages/manage/manage.page.container"));
|
const ManagePage = lazy(() => import("../pages/manage/manage.page.container"));
|
||||||
@@ -147,19 +147,7 @@ export function App({ bodyshop, checkUserSession, currentUser, online, setOnline
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<ProductFruits
|
<ProductFruitsWrapper currentUser={currentUser} />
|
||||||
workspaceCode={InstanceRenderMgr({
|
|
||||||
imex: null,
|
|
||||||
rome: "9BkbEseqNqxw8jUH",
|
|
||||||
promanager: "aoJoEifvezYI0Z0P"
|
|
||||||
})}
|
|
||||||
debug
|
|
||||||
language="en"
|
|
||||||
user={{
|
|
||||||
email: currentUser.email,
|
|
||||||
username: currentUser.email
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route
|
<Route
|
||||||
|
|||||||
27
client/src/App/ProductFruitsWrapper.jsx
Normal file
27
client/src/App/ProductFruitsWrapper.jsx
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import React from "react";
|
||||||
|
import { ProductFruits } from "react-product-fruits";
|
||||||
|
import InstanceRenderMgr from "../utils/instanceRenderMgr";
|
||||||
|
|
||||||
|
const ProductFruitsWrapper = React.memo(({ currentUser }) => {
|
||||||
|
return (
|
||||||
|
currentUser?.authorized === true &&
|
||||||
|
currentUser?.email && (
|
||||||
|
<ProductFruits
|
||||||
|
lifeCycle="unmount"
|
||||||
|
workspaceCode={InstanceRenderMgr({
|
||||||
|
imex: null,
|
||||||
|
rome: "9BkbEseqNqxw8jUH",
|
||||||
|
promanager: "aoJoEifvezYI0Z0P"
|
||||||
|
})}
|
||||||
|
debug
|
||||||
|
language="en"
|
||||||
|
user={{
|
||||||
|
email: currentUser.email,
|
||||||
|
username: currentUser.email
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
export default ProductFruitsWrapper;
|
||||||
Reference in New Issue
Block a user