change url param name to "subdomain"
This commit is contained in:
@@ -24,7 +24,7 @@ export function SearchMenu({ products }: MenuListProps) {
|
||||
const navigate = useNavigate();
|
||||
const { t } = useTranslation();
|
||||
const { themeName } = useAppSelector((state) => state.theme);
|
||||
const { id } = useParams();
|
||||
const { subdomain } = useParams();
|
||||
|
||||
// Show error state if data exists but has no products
|
||||
if (products && (!products || products.length === 0)) {
|
||||
@@ -48,7 +48,7 @@ export function SearchMenu({ products }: MenuListProps) {
|
||||
className={styles.productLink + " product-link-search"}
|
||||
onClick={() => {
|
||||
localStorage.setItem("product", JSON.stringify(item));
|
||||
navigate(`/${id}/product/${item.id}`);
|
||||
navigate(`/${subdomain}/product/${item.id}`);
|
||||
}}
|
||||
>
|
||||
<Card
|
||||
|
||||
Reference in New Issue
Block a user