From ab1b6e1a8d8ee488183be7e9acaabb7f41151e97 Mon Sep 17 00:00:00 2001 From: KillariDev Date: Mon, 29 Jan 2024 16:22:23 +0200 Subject: [PATCH 1/2] don't try to request undefined image when background image is missing for card --- src/components/About/Card.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/About/Card.tsx b/src/components/About/Card.tsx index 886751ed244..c5b7b47224d 100644 --- a/src/components/About/Card.tsx +++ b/src/components/About/Card.tsx @@ -13,7 +13,7 @@ const StyledCard = styled.div<{ $isDarkMode: boolean; $backgroundImgSrc?: string background: ${({ $isDarkMode, $backgroundImgSrc, $type, theme }) => $isDarkMode ? `${theme.surface2} ${$backgroundImgSrc ? ` url(${$backgroundImgSrc})` : ''}` - : `${$type === CardType.Primary ? 'white' : theme.surface2} url(${$backgroundImgSrc})`}; + : `${$type === CardType.Primary ? 'white' : theme.surface2} ${$backgroundImgSrc ? ` url(${$backgroundImgSrc})` : ''}`}; background-size: auto 100%; background-position: right; background-repeat: no-repeat; From bac49525914bff96be12b56b1af58f005cf38513 Mon Sep 17 00:00:00 2001 From: KillariDev Date: Mon, 29 Jan 2024 16:28:08 +0200 Subject: [PATCH 2/2] fix linting --- src/components/About/Card.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/About/Card.tsx b/src/components/About/Card.tsx index c5b7b47224d..fb6e2b23d5e 100644 --- a/src/components/About/Card.tsx +++ b/src/components/About/Card.tsx @@ -13,7 +13,9 @@ const StyledCard = styled.div<{ $isDarkMode: boolean; $backgroundImgSrc?: string background: ${({ $isDarkMode, $backgroundImgSrc, $type, theme }) => $isDarkMode ? `${theme.surface2} ${$backgroundImgSrc ? ` url(${$backgroundImgSrc})` : ''}` - : `${$type === CardType.Primary ? 'white' : theme.surface2} ${$backgroundImgSrc ? ` url(${$backgroundImgSrc})` : ''}`}; + : `${$type === CardType.Primary ? 'white' : theme.surface2} ${ + $backgroundImgSrc ? ` url(${$backgroundImgSrc})` : '' + }`}; background-size: auto 100%; background-position: right; background-repeat: no-repeat;