From a7a9753164ab66a3738fa693ad87c907eb9dd6bf Mon Sep 17 00:00:00 2001 From: luisdralves Date: Fri, 22 Sep 2023 10:40:52 +0100 Subject: [PATCH] Change 50 pesetas shape to spanish flower --- src/components/coin/index.tsx | 8 ++++++-- src/pages/api/merge-textures/[id].ts | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/coin/index.tsx b/src/components/coin/index.tsx index c0c1686..92b562a 100644 --- a/src/components/coin/index.tsx +++ b/src/components/coin/index.tsx @@ -111,8 +111,12 @@ export const BaseCoin = ({ export const CoinInstance = (coin: NumistaType) => { if ( - coin.value?.numeric_value === 0.2 && - coin.value?.currency?.name === "Euro" + (coin.value?.numeric_value === 0.2 && + coin.value?.currency?.name === "Euro") || + (coin.value?.numeric_value === 50 && + coin.value?.currency?.name === "Peseta" && + coin.min_year && + coin.min_year >= 1990) ) { return ; } diff --git a/src/pages/api/merge-textures/[id].ts b/src/pages/api/merge-textures/[id].ts index 1f55ead..aab6304 100644 --- a/src/pages/api/merge-textures/[id].ts +++ b/src/pages/api/merge-textures/[id].ts @@ -68,6 +68,7 @@ const generateImage = async (id: string) => { path.join("./public", coin.reverse.picture), "-resize", "256x256!", + ...(coin.orientation === "coin" ? ["-rotate", "180"] : []), path.join("./public/photos/joined", id + "-reverse.jpg"), ]);