From 479f2359dca8d62fca2a7512768cad19023aae5b Mon Sep 17 00:00:00 2001 From: Ivan Date: Mon, 11 Nov 2024 12:15:53 -0800 Subject: [PATCH] Fixed author pfp in research page --- frontend/src/components/pages/ResearchPage.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/pages/ResearchPage.tsx b/frontend/src/components/pages/ResearchPage.tsx index f9861a57..e3c9af0c 100644 --- a/frontend/src/components/pages/ResearchPage.tsx +++ b/frontend/src/components/pages/ResearchPage.tsx @@ -105,7 +105,7 @@ const MediumCard: React.FC<{ article: ResearchPost }> = ({ article }) => {
{article.author} @@ -144,4 +144,15 @@ const MediumCard: React.FC<{ article: ResearchPost }> = ({ article }) => { ); }; +const getAuthorImage = (author: string): string => { + switch (author.toLowerCase()) { + case "ben bolte": + return "https://miro.medium.com/v2/resize:fill:176:176/1*EuQxKArtHb0orCJcWTPHkA.jpeg"; + case "paweł budzianowski": + return "https://miro.medium.com/v2/resize:fill:40:40/1*REeM2VDUPg7VWMU1UwnsBw.png"; + default: + return "https://miro.medium.com/v2/resize:fill:40:40/1*REeM2VDUPg7VWMU1UwnsBw.png"; + } +}; + export default MediumArticles;