diff --git a/client/src/containers/home/top-stories/item.tsx b/client/src/containers/home/top-stories/item.tsx index 12f51a4..c22cb9f 100644 --- a/client/src/containers/home/top-stories/item.tsx +++ b/client/src/containers/home/top-stories/item.tsx @@ -22,12 +22,14 @@ const TopStoriesItem = ({ story }: TopStoriesItemProps) => { } }; + const src = story?.image; + return (
{story.title} {
{d.logos && d.logos?.data?.map((logo, index) => { - const src = - env.NEXT_PUBLIC_ENVIRONMENT === 'development' - ? `${env.NEXT_PUBLIC_API_URL.replace('/api', '')}${ - logo?.attributes?.url - }` - : logo?.attributes?.url || ''; + const src = getImageSrc(logo?.attributes?.url); + const url = links[i][index]; return url ? ( + env.NEXT_PUBLIC_ENVIRONMENT === 'development' + ? `${env.NEXT_PUBLIC_API_URL.replace('/api', '')}${url}` + : url || '';