formatting
This commit is contained in:
parent
f73906bf1e
commit
01039a54e7
@ -56,7 +56,10 @@ const MasonryGallery = ({
|
|||||||
// );
|
// );
|
||||||
|
|
||||||
// const { breakpoint } = useBreakpoint(breakpoints, "sm");
|
// const { breakpoint } = useBreakpoint(breakpoints, "sm");
|
||||||
console.log("🚀 ~ file: MasonryGallery.tsx ~ line 46 ~ breakpoint", breakpoint)
|
console.log(
|
||||||
|
"🚀 ~ file: MasonryGallery.tsx ~ line 46 ~ breakpoint",
|
||||||
|
breakpoint
|
||||||
|
);
|
||||||
|
|
||||||
const aspectRatios = React.useMemo(
|
const aspectRatios = React.useMemo(
|
||||||
() => R.map(getAspectRatio, images).filter(Boolean),
|
() => R.map(getAspectRatio, images).filter(Boolean),
|
||||||
@ -109,7 +112,6 @@ const MasonryGallery = ({
|
|||||||
|
|
||||||
let cursor = 0;
|
let cursor = 0;
|
||||||
return (
|
return (
|
||||||
<>
|
|
||||||
<div
|
<div
|
||||||
className="flex items-center flex-wrap sm:container mx-auto"
|
className="flex items-center flex-wrap sm:container mx-auto"
|
||||||
ref={observe}
|
ref={observe}
|
||||||
@ -169,13 +171,13 @@ const MasonryGallery = ({
|
|||||||
<span className="text-white z-20 absolute bg-black">
|
<span className="text-white z-20 absolute bg-black">
|
||||||
hsl(
|
hsl(
|
||||||
{image.fields?.imageMeta?.dominantHue?.[0]},{" "}
|
{image.fields?.imageMeta?.dominantHue?.[0]},{" "}
|
||||||
{(
|
{(image.fields?.imageMeta?.dominantHue?.[1] ?? 0 * 100).toFixed(
|
||||||
image.fields?.imageMeta?.dominantHue?.[1] ?? 0 * 100
|
2
|
||||||
).toFixed(2)}
|
)}
|
||||||
%,{" "}
|
%,{" "}
|
||||||
{(
|
{(image.fields?.imageMeta?.dominantHue?.[2] ?? 0 * 100).toFixed(
|
||||||
image.fields?.imageMeta?.dominantHue?.[2] ?? 0 * 100
|
2
|
||||||
).toFixed(2)}
|
)}
|
||||||
% )
|
% )
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
@ -196,7 +198,6 @@ const MasonryGallery = ({
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user