Skip to content

Commit

Permalink
refactor(homepage): remove unused image logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ben196888 committed Oct 30, 2023
1 parent c448b8e commit be3a01b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions homepage/src/lib/processCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit be3a01b

Please sign in to comment.