fix SSR gallery
This commit is contained in:
parent
65f793dde4
commit
d28ee00866
@ -51,9 +51,7 @@ const MasonryGallery = ({
|
|||||||
|
|
||||||
// const breakpoint = currentBreakpoint.length ? currentBreakpoint : "xs";
|
// const breakpoint = currentBreakpoint.length ? currentBreakpoint : "xs";
|
||||||
console.log("🚀 ~ file: MasonryGallery.tsx ~ line 51 ~ breakpoint", breakpoint)
|
console.log("🚀 ~ file: MasonryGallery.tsx ~ line 51 ~ breakpoint", breakpoint)
|
||||||
const galleryWidth = `calc(100vw - ${
|
const galleryWidth = `calc(100vw - ${ breakpoint === "xs" || breakpoint === "sm" ? "32" : "160" }px)`;
|
||||||
breakpoint === "xs" || breakpoint === "sm" ? "32" : "160"
|
|
||||||
}px)`;
|
|
||||||
console.log("🚀 ~ file: MasonryGallery.tsx ~ line 55 ~ galleryWidth", galleryWidth)
|
console.log("🚀 ~ file: MasonryGallery.tsx ~ line 55 ~ galleryWidth", galleryWidth)
|
||||||
|
|
||||||
const aspectRatios = React.useMemo(
|
const aspectRatios = React.useMemo(
|
||||||
@ -110,7 +108,7 @@ const MasonryGallery = ({
|
|||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"flex items-center flex-wrap mx-auto px-4 md:px-8",
|
"flex items-center flex-wrap mx-auto px-4 md:px-8",
|
||||||
isClient ? "" : "max-w-[320px]"
|
isClient ? "" : ""
|
||||||
)}
|
)}
|
||||||
// ref={observe}
|
// ref={observe}
|
||||||
style={{
|
style={{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user