update restaurant details source & add loyalty icon
This commit is contained in:
@@ -19,11 +19,12 @@ import LocalStorageHandler from "../menu/components/LocalStorageHandler";
|
||||
export default function RestaurantPage() {
|
||||
const param = useParams();
|
||||
const { isRTL } = useAppSelector((state) => state.locale);
|
||||
const { data, isLoading } = useGetRestaurantDetailsQuery(param.id, {
|
||||
skip: !param.id,
|
||||
});
|
||||
const { restaurant, dineIn, pickup, delivery, gift, toOffice, toRoom } =
|
||||
data || {};
|
||||
const { data: restaurant, isLoading } = useGetRestaurantDetailsQuery(
|
||||
"595",
|
||||
{
|
||||
skip: !param.id,
|
||||
},
|
||||
);
|
||||
|
||||
if (isLoading) {
|
||||
return <Loader />;
|
||||
@@ -34,8 +35,7 @@ export default function RestaurantPage() {
|
||||
}
|
||||
|
||||
if (restaurant) {
|
||||
localStorage.setItem("restaurantID", restaurant.id);
|
||||
localStorage.setItem("restaurantName", restaurant.subdomain);
|
||||
localStorage.setItem("restaurantID", restaurant.restautantId);
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -48,7 +48,7 @@ export default function RestaurantPage() {
|
||||
<div style={{ textAlign: "center", maxWidth: "100%" }}>
|
||||
<div className={styles.logoContainer}>
|
||||
<img
|
||||
src={restaurant?.logom || ""}
|
||||
src={restaurant?.restaurant_logo || ""}
|
||||
alt="logo"
|
||||
width={96}
|
||||
height={96}
|
||||
@@ -56,7 +56,7 @@ export default function RestaurantPage() {
|
||||
/>
|
||||
</div>
|
||||
<ProTitle level={5} style={{ margin: 0 }}>
|
||||
{isRTL ? restaurant?.nameAR : restaurant?.name}
|
||||
{isRTL ? restaurant?.nameAR : restaurant?.restautantName}
|
||||
</ProTitle>
|
||||
<ProText style={{ fontSize: 14, margin: 0 }}>
|
||||
{isRTL ? restaurant?.descriptionAR : restaurant?.description}
|
||||
@@ -64,12 +64,12 @@ export default function RestaurantPage() {
|
||||
</div>
|
||||
|
||||
<RestaurantServices
|
||||
dineIn={dineIn}
|
||||
pickup={pickup}
|
||||
gift={gift}
|
||||
delivery={delivery}
|
||||
toRoom={toRoom}
|
||||
toOffice={toOffice}
|
||||
dineIn={restaurant?.dineIn}
|
||||
pickup={restaurant?.pickup}
|
||||
gift={restaurant?.gift}
|
||||
delivery={restaurant?.delivery}
|
||||
toRoom={restaurant?.toRoom}
|
||||
toOffice={restaurant?.toOffice}
|
||||
is_booking_enabled={restaurant?.is_booking_enabled === 1}
|
||||
params={{ id: "1", locale: "en" }}
|
||||
/>
|
||||
@@ -85,8 +85,8 @@ export default function RestaurantPage() {
|
||||
</div>
|
||||
|
||||
<LocalStorageHandler
|
||||
restaurantID={restaurant.id}
|
||||
restaurantName={restaurant.subdomain}
|
||||
restaurantID={restaurant.restautantId}
|
||||
restaurantName={restaurant.restautantName}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user