From 297848a83aac0586ecfcad9238ea0de111abe872 Mon Sep 17 00:00:00 2001 From: Citali Date: Sun, 13 Jul 2025 00:27:50 +0200 Subject: [PATCH] add more rando --- src/actions/portfolio/getJustifiedImages.ts | 6 +++--- src/app/portfolio/two/page.tsx | 2 +- src/components/portfolio/ImageCard.tsx | 2 +- src/components/portfolio/JustifiedGallery.tsx | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/actions/portfolio/getJustifiedImages.ts b/src/actions/portfolio/getJustifiedImages.ts index 0e0c2bc..4b54b58 100644 --- a/src/actions/portfolio/getJustifiedImages.ts +++ b/src/actions/portfolio/getJustifiedImages.ts @@ -6,7 +6,7 @@ export async function getJustifiedImages() { const images = await prisma.portfolioImage.findMany({ where: { variants: { - some: { type: "thumbnail" }, + some: { type: "resized" }, }, }, include: { @@ -17,7 +17,7 @@ export async function getJustifiedImages() { return images .map((img) => { - const variant = img.variants.find((v) => v.type === "thumbnail"); + const variant = img.variants.find((v) => v.type === "resized"); if (!variant || !variant.width || !variant.height) return null; const bg = img.colors.find((c) => c.type === "vibrant")?.color.hex ?? "#e5e7eb"; @@ -29,7 +29,7 @@ export async function getJustifiedImages() { backgroundColor: bg, width: variant.width, height: variant.height, - url: variant.url ?? `/api/image/thumbnail/${img.fileKey}.webp`, + url: variant.url ?? `/api/image/resized/${img.fileKey}.webp`, }; }) .filter(Boolean) as JustifiedInputImage[]; diff --git a/src/app/portfolio/two/page.tsx b/src/app/portfolio/two/page.tsx index e7cf781..112bc55 100644 --- a/src/app/portfolio/two/page.tsx +++ b/src/app/portfolio/two/page.tsx @@ -6,7 +6,7 @@ export default async function PortfolioTwoPage() { return (
- +
); } \ No newline at end of file diff --git a/src/components/portfolio/ImageCard.tsx b/src/components/portfolio/ImageCard.tsx index 51877d1..0041f50 100644 --- a/src/components/portfolio/ImageCard.tsx +++ b/src/components/portfolio/ImageCard.tsx @@ -56,7 +56,7 @@ export function ImageCard(props: ImageCardProps) { return (
+
{rows.length === 0 && (

No images to display

)} {rows.map((row, i) => (
{row.map((img) => (