- Improve product fruits wrapper for extra checks
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -142,7 +142,14 @@ export function App({ bodyshop, checkUserSession, currentUser, online, setOnline
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<ProductFruitsWrapper currentUser={currentUser} />
|
<ProductFruitsWrapper
|
||||||
|
currentUser={currentUser}
|
||||||
|
workspaceCode={InstanceRenderMgr({
|
||||||
|
imex: null,
|
||||||
|
rome: "9BkbEseqNqxw8jUH",
|
||||||
|
promanager: "aoJoEifvezYI0Z0P"
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route
|
<Route
|
||||||
|
|||||||
@@ -1,18 +1,14 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { ProductFruits } from "react-product-fruits";
|
import { ProductFruits } from "react-product-fruits";
|
||||||
import InstanceRenderMgr from "../utils/instanceRenderMgr";
|
|
||||||
|
|
||||||
const ProductFruitsWrapper = React.memo(({ currentUser }) => {
|
const ProductFruitsWrapper = React.memo(({ currentUser, workspaceCode }) => {
|
||||||
return (
|
return (
|
||||||
|
workspaceCode &&
|
||||||
currentUser?.authorized === true &&
|
currentUser?.authorized === true &&
|
||||||
currentUser?.email && (
|
currentUser?.email && (
|
||||||
<ProductFruits
|
<ProductFruits
|
||||||
lifeCycle="unmount"
|
lifeCycle="unmount"
|
||||||
workspaceCode={InstanceRenderMgr({
|
workspaceCode={workspaceCode}
|
||||||
imex: null,
|
|
||||||
rome: "9BkbEseqNqxw8jUH",
|
|
||||||
promanager: "aoJoEifvezYI0Z0P"
|
|
||||||
})}
|
|
||||||
debug
|
debug
|
||||||
language="en"
|
language="en"
|
||||||
user={{
|
user={{
|
||||||
|
|||||||
Reference in New Issue
Block a user