@@ -6,11 +6,16 @@ import Section, {
66} from "../../components/ui/Section" ;
77import { useOffer } from "@decocms/apps/commerce/sdk/useOffer" ;
88import { useSendEvent } from "../../sdk/useSendEvent" ;
9+ import DeviceVisible , {
10+ type VisibilityConfig ,
11+ } from "../../components/ui/DeviceVisible" ;
912import { type LoadingFallbackProps } from "~/types/deco" ;
10- export interface Props extends SectionHeaderProps {
13+ export interface Props extends SectionHeaderProps , VisibilityConfig {
1114 products : Product [ ] | null ;
1215}
13- export default function ProductShelf ( { products, title, cta } : Props ) {
16+ export default function ProductShelf (
17+ { products, title, cta, visibility } : Props ,
18+ ) {
1419 if ( ! products || products . length === 0 ) {
1520 return null ;
1621 }
@@ -31,11 +36,13 @@ export default function ProductShelf({ products, title, cta }: Props) {
3136 } ,
3237 } ) ;
3338 return (
34- < Section . Container { ...viewItemListEvent } >
35- < Section . Header title = { title } cta = { cta } />
39+ < DeviceVisible visibility = { visibility } >
40+ < Section . Container { ...viewItemListEvent } >
41+ < Section . Header title = { title } cta = { cta } />
3642
37- < ProductSlider products = { products } itemListName = { title } />
38- </ Section . Container >
43+ < ProductSlider products = { products } itemListName = { title } />
44+ </ Section . Container >
45+ </ DeviceVisible >
3946 ) ;
4047}
4148export const LoadingFallback = (
0 commit comments