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

@@ -23,7 +23,6 @@ interface MenuListProps {
categories: { id: number; name: string; image?: string }[];
}
| undefined;
id: string;
categoryRefs: React.RefObject<{ [key: number]: HTMLDivElement | null }>;
}
@@ -32,7 +31,7 @@ export function MenuList({ data, categoryRefs }: MenuListProps) {
const products = data?.products;
const { isMobile, isTablet, isDesktop } = useBreakPoint();
const { items } = useAppSelector((state) => state.order);
const { id } = useParams();
const { subdomain } = useParams();
const navigate = useNavigate();
const { t } = useTranslation();
const { themeName } = useAppSelector((state) => state.theme);
@@ -46,7 +45,7 @@ export function MenuList({ data, categoryRefs }: MenuListProps) {
if (isDesktop) {
setIsDialogOpen(true);
} else {
navigate(`/${id}/product/${item.id}`);
navigate(`/${subdomain}/product/${item.id}`);
}
};