update resolve route
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
||||
useProduct,
|
||||
useProductRecommendations,
|
||||
} from '@/hooks/use-shopify-products';
|
||||
import { useRouteHandle } from '@/lib/resolve-route';
|
||||
import { useRouteSegment } from '@/hooks/use-route-segment';
|
||||
import { ProductCard } from './product-card';
|
||||
|
||||
export type ProductRecommendationsProps = {
|
||||
@@ -20,7 +20,7 @@ export function ProductRecommendationsView({
|
||||
heading,
|
||||
limit,
|
||||
}: ProductRecommendationsProps) {
|
||||
const routeHandle = useRouteHandle();
|
||||
const routeHandle = useRouteSegment();
|
||||
const handle = selected?.handle ?? routeHandle ?? null;
|
||||
const { product } = useProduct(handle);
|
||||
const { recommendations, loading, error } = useProductRecommendations(
|
||||
|
||||
Reference in New Issue
Block a user