translations & don't open product details BM if restaurant is closed
This commit is contained in:
@@ -19,7 +19,7 @@ type Props = {
|
||||
export default function ProductCard({ item, setIsBottomSheetOpen }: Props) {
|
||||
const { isRTL } = useAppSelector((state) => state.locale);
|
||||
const { isMobile, isTablet, isDesktop } = useBreakPoint();
|
||||
const { items } = useAppSelector((state) => state.order);
|
||||
const { items, restaurant } = useAppSelector((state) => state.order);
|
||||
const [isDialogOpen, setIsDialogOpen] = useState(false);
|
||||
// const navigate = useNavigate();
|
||||
// const { subdomain } = useParams();
|
||||
@@ -37,10 +37,7 @@ export default function ProductCard({ item, setIsBottomSheetOpen }: Props) {
|
||||
if (isDesktop) {
|
||||
setIsDialogOpen(true);
|
||||
}
|
||||
setIsBottomSheetOpen(true);
|
||||
// else {
|
||||
// navigate(`/${subdomain}/product/${item.id}`);
|
||||
// }
|
||||
if (restaurant?.isOpened) setIsBottomSheetOpen(true);
|
||||
};
|
||||
|
||||
const hasOptions =
|
||||
|
||||
@@ -125,8 +125,13 @@ function MenuPage() {
|
||||
{orderType === OrderType.Redeem && (
|
||||
<div className={styles.frame}>
|
||||
<div className={styles.div}>
|
||||
<div className={styles.pickup}>Balance</div>
|
||||
<div className={styles.elementMin}>60 OMR</div>
|
||||
<div className={styles.pickup}>{t("menu.balance")}</div>
|
||||
<div className={styles.elementMin}>
|
||||
60{" "}
|
||||
{isRTL
|
||||
? restaurant?.local_currency
|
||||
: restaurant?.global_currency}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
@@ -209,7 +214,7 @@ function MenuPage() {
|
||||
color: "#09237D",
|
||||
}}
|
||||
>
|
||||
Call Waiter
|
||||
{t("menu.callWaiter")}
|
||||
</ProText>
|
||||
</Button>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user