change url param name to "subdomain"

This commit is contained in:
2025-10-31 13:56:20 +03:00
parent 42d0b2cacf
commit 3dddc78dda
24 changed files with 89 additions and 116 deletions

View File

@@ -11,7 +11,7 @@ import styles from "./LoyaltyCard.module.css";
const LoyaltyCard = () => {
const { t } = useTranslation();
const { id } = useParams();
const { subdomain } = useParams();
const { data: restaurant } = useGetRestaurantDetailsQuery("595");
const token = localStorage.getItem(ACCESS_TOKEN);
const isHasLoyaltyGift =
@@ -68,7 +68,7 @@ const LoyaltyCard = () => {
{!token && (
<div style={{ paddingTop: 4 }}>
<Link
to={`/${id}/login`}
to={`/${subdomain}/login`}
style={{
color: colors.primary,
textDecoration: "underline",

View File

@@ -10,7 +10,7 @@ export const PrivateRoute = ({
permission?: string;
}) => {
const { token, loading } = useAppSelector((state) => state.auth);
const { id } = useParams();
const { subdomain } = useParams();
// const { data: user, isLoading: loadingUser } = useGetSignedUserInfoQuery();
@@ -36,7 +36,7 @@ export const PrivateRoute = ({
if (!token) {
return <Navigate to={`/${id}/login`} />;
return <Navigate to={`/${subdomain}/login`} />;
}
// if (token && !userHasRequiredPermission) {