menu: on click on prduct open details as BS, also add redirect button to detials page if user click on redirect button
This commit is contained in:
@@ -55,6 +55,9 @@ export default function ProductFooter({
|
||||
product.extras.length,
|
||||
product?.theExtrasGroups?.length,
|
||||
]);
|
||||
const isBottomSheetView = useMemo(() => {
|
||||
return window.location.href.includes("menu");
|
||||
}, []);
|
||||
|
||||
const handleAddToCart = () => {
|
||||
if (restaurant && !restaurant.isOpened) {
|
||||
@@ -114,7 +117,7 @@ export default function ProductFooter({
|
||||
}),
|
||||
);
|
||||
// Navigate back to menu - scroll position will be restored automatically
|
||||
if (!isDesktop) window.history.back();
|
||||
if (!isDesktop && !isBottomSheetView ) window.history.back();
|
||||
else {
|
||||
onClose?.();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user