Merged in release/2024-07-19 (pull request #1531)

Release/2024 07 19
This commit is contained in:
Dave Richer
2024-07-19 20:02:39 +00:00
2 changed files with 20 additions and 8 deletions

View File

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

View File

@@ -1,18 +1,15 @@
import React from "react";
import { ProductFruits } from "react-product-fruits";
import InstanceRenderMgr from "../utils/instanceRenderMgr";
import PropTypes from "prop-types";
const ProductFruitsWrapper = React.memo(({ currentUser }) => {
const ProductFruitsWrapper = React.memo(({ currentUser, workspaceCode }) => {
return (
workspaceCode &&
currentUser?.authorized === true &&
currentUser?.email && (
<ProductFruits
lifeCycle="unmount"
workspaceCode={InstanceRenderMgr({
imex: null,
rome: "9BkbEseqNqxw8jUH",
promanager: "aoJoEifvezYI0Z0P"
})}
workspaceCode={workspaceCode}
debug
language="en"
user={{
@@ -25,3 +22,11 @@ const ProductFruitsWrapper = React.memo(({ currentUser }) => {
});
export default ProductFruitsWrapper;
ProductFruitsWrapper.propTypes = {
currentUser: PropTypes.shape({
authorized: PropTypes.bool,
email: PropTypes.string
}).isRequired,
workspaceCode: PropTypes.string.isRequired
};