'use client'; import { useStoreInfo } from '@/core/providers/store-provider'; import { reviewsAreOn } from '@/core/lib/store-info'; /** * Whether to render reviews UI: the section, the star rating on a product card, * a rating band. `false` only when the merchant switched reviews off. * * Absent counts as ON, including while the store info is still loading, so a * store with reviews on never flashes its stars away. `Product.avgRating` and * `reviewCount` keep their stored values while reviews are off, so gate on this, * never on `reviewCount > 0`. */ export function useReviewsEnabled(): boolean { return reviewsAreOn(useStoreInfo().storeInfo); }