From be3a01be93dbd2e126b8f6abb7551aad9656d994 Mon Sep 17 00:00:00 2001 From: Ben Liu Date: Tue, 31 Oct 2023 01:14:44 +0700 Subject: [PATCH] refactor(homepage): remove unused image logic --- homepage/src/lib/processCard.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/homepage/src/lib/processCard.js b/homepage/src/lib/processCard.js index c02a07c1..93fbec4a 100644 --- a/homepage/src/lib/processCard.js +++ b/homepage/src/lib/processCard.js @@ -6,10 +6,7 @@ export const processCard = (card, cards) => { let image = data.image; const defaultImage = '/images/uploads/初階專案卡封面-01.png'; - image = image ? image.replace('/homepage/public', '') : defaultImage; - - // Workaround for image prefix path. Will be removed after image path is fixed in all cards. - image = !image.startsWith('/') ? `/${image}` : image; + image = image ?? defaultImage; data = { ...data,