From 98ef8fb98400eb875afb8ffbe240917c10876135 Mon Sep 17 00:00:00 2001 From: emengweb Date: Wed, 18 Oct 2023 16:32:38 +0800 Subject: [PATCH] optimize pageIcon check and set width --- themes/nav/components/BlogPostCard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/nav/components/BlogPostCard.js b/themes/nav/components/BlogPostCard.js index 41d654d3f62..127e2480830 100755 --- a/themes/nav/components/BlogPostCard.js +++ b/themes/nav/components/BlogPostCard.js @@ -7,7 +7,7 @@ import React from 'react' const BlogPostCard = ({ post, className }) => { const router = useRouter() const currentSelected = router.asPath.split('?')[0] === '/' + post.slug - const pageIcon = post.pageIcon.startsWith("http") ? post.pageIcon+"&width=88" : post.pageIcon + const pageIcon = post.pageIcon.indexOf("amazonaws.com")!=-1 ? post.pageIcon+"&width=88" : post.pageIcon return (