;
};
const VerticalMosaicPage = ({items}: VerticalMosaicPageProps) => {
@@ -88,7 +100,7 @@ const VerticalMosaicPage = ({items}: VerticalMosaicPageProps) => {
{items.map((item, itemIndex) => (
- {item}
+ {renderItem(item, items.length === 2 ? 'square' : 'horizontal')}
))}
@@ -101,7 +113,7 @@ const VerticalMosaicPage = ({items}: VerticalMosaicPageProps) => {
{items.map((item, itemIndex) => (
- {item}
+ {renderItem(item, itemIndex === 0 ? 'vertical' : 'square')}
))}
@@ -113,10 +125,10 @@ const VerticalMosaicPage = ({items}: VerticalMosaicPageProps) => {
return (
- {items[0]}
- {items[1]}
- {items[3]}
- {items[2]}
+ {renderItem(items[0], 'vertical')}
+ {renderItem(items[1], 'square')}
+ {renderItem(items[3], 'vertical')}
+ {renderItem(items[2], 'square')}
);
@@ -124,7 +136,7 @@ const VerticalMosaicPage = ({items}: VerticalMosaicPageProps) => {
};
type VerticalMosaicProps = {
- items: ReadonlyArray;
+ items: ReadonlyArray;
dataAttributes?: DataAttributes;
};
@@ -132,7 +144,7 @@ export const VerticalMosaic = ({items, dataAttributes}: VerticalMosaicProps): JS
const itemsCount = items.length;
const pagesCount = Math.ceil(itemsCount / 4);
- const pages = Array.from({length: pagesCount}, () => [] as Array>);
+ const pages = Array.from({length: pagesCount}, () => [] as Array);
items.forEach((item, index) => {
const itemPageIndex = Math.floor(index / 4);