Fix responsive layout with max items per row for each breakpoint
This commit is contained in:
@ -90,17 +90,17 @@ export default function PortfolioGallery({
|
||||
dominantHex: it.dominantHex,
|
||||
}));
|
||||
|
||||
useEffect(() => {
|
||||
if (items.length === 0) return;
|
||||
// Debug: inspect dominantHex values coming from the server.
|
||||
console.log(
|
||||
"[PortfolioGallery] dominantHex sample",
|
||||
items.slice(0, 5).map((it) => ({
|
||||
id: it.id,
|
||||
dominantHex: it.dominantHex,
|
||||
}))
|
||||
);
|
||||
}, [items]);
|
||||
// useEffect(() => {
|
||||
// if (items.length === 0) return;
|
||||
// // Debug: inspect dominantHex values coming from the server.
|
||||
// console.log(
|
||||
// "[PortfolioGallery] dominantHex sample",
|
||||
// items.slice(0, 5).map((it) => ({
|
||||
// id: it.id,
|
||||
// dominantHex: it.dominantHex,
|
||||
// }))
|
||||
// );
|
||||
// }, [items]);
|
||||
|
||||
if (!loading && done && galleryItems.length === 0) {
|
||||
return (
|
||||
@ -116,6 +116,7 @@ export default function PortfolioGallery({
|
||||
items={galleryItems}
|
||||
hrefFrom="portfolio"
|
||||
showCaption={false}
|
||||
debug={false}
|
||||
targetRowHeight={160}
|
||||
targetRowHeightMobile={160}
|
||||
maxRowHeight={300}
|
||||
|
||||
Reference in New Issue
Block a user