change url param name to "subdomain"
This commit is contained in:
@@ -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}`);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user