menu: make back btn navigate to service page if token existed
This commit is contained in:
@@ -38,6 +38,7 @@ function MenuPage() {
|
||||
const { subdomain } = useParams();
|
||||
const { isRTL } = useAppSelector((state) => state.locale);
|
||||
const { orderType } = useAppSelector((state) => state.order);
|
||||
const { token } = useAppSelector((state) => state.auth);
|
||||
const { t } = useTranslation();
|
||||
const { data: restaurant, isLoading: isLoadingRestaurant } =
|
||||
useGetRestaurantDetailsQuery(subdomain, {
|
||||
@@ -91,7 +92,9 @@ function MenuPage() {
|
||||
<div
|
||||
className={`${styles.headerFloatingBtn} ${styles.backButtonContainer}`}
|
||||
>
|
||||
<BackButton />
|
||||
<BackButton
|
||||
{...(token ? { customRoute: `/${subdomain}` } : {})}
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className={`${styles.headerFloatingBtn} ${styles.orderTypeSelectContainer} order-type-select-container`}
|
||||
|
||||
Reference in New Issue
Block a user