From 70873334dcaf455b448cbc0615d93478589804ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Alexander=20Str=C3=B8mseng?= Date: Wed, 10 Apr 2024 17:00:34 +0200 Subject: [PATCH] fix: avatar image --- frontend/src/app/blog/[articleSlug]/page.tsx | 2 +- frontend/src/components/AvatarImageFix.tsx | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/frontend/src/app/blog/[articleSlug]/page.tsx b/frontend/src/app/blog/[articleSlug]/page.tsx index f08bcab..5b9fe37 100644 --- a/frontend/src/app/blog/[articleSlug]/page.tsx +++ b/frontend/src/app/blog/[articleSlug]/page.tsx @@ -92,7 +92,7 @@ export default async function Page({
{avatarURL && ( - + {// Get initials from author name authorName diff --git a/frontend/src/components/AvatarImageFix.tsx b/frontend/src/components/AvatarImageFix.tsx index a3bb7d4..473eb9e 100644 --- a/frontend/src/components/AvatarImageFix.tsx +++ b/frontend/src/components/AvatarImageFix.tsx @@ -1,16 +1,15 @@ import React from "react"; -import * as AvatarPrimitive from "@radix-ui/react-avatar"; import { cn } from "@/lib/utils"; -const STRAPI_URL = process.env.STRAPI_URL; +import Image from "next/image"; const AvatarImageFix = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef + React.ElementRef, + React.ComponentPropsWithoutRef >(({ className, src, ...props }, ref) => ( - ));