Skip to content

Commit

Permalink
Merge branch 'main' of github.com:NTNU-SmallSat-Lab/outreach-website
Browse files Browse the repository at this point in the history
  • Loading branch information
EliasKnudsen committed Apr 10, 2024
2 parents d65c3bc + 7087333 commit 74fc343
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion frontend/src/app/blog/[articleSlug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default async function Page({
<div className="flex flex-1 justify-start gap-1">
{avatarURL && (
<Avatar className="">
<AvatarImageFix src={avatarURL} />
<AvatarImageFix src={avatarURL} alt="Avatar" />
<AvatarFallback>
{// Get initials from author name
authorName
Expand Down
11 changes: 5 additions & 6 deletions frontend/src/components/AvatarImageFix.tsx
Original file line number Diff line number Diff line change
@@ -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<typeof AvatarPrimitive.Image>,
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
React.ElementRef<typeof Image>,
React.ComponentPropsWithoutRef<typeof Image>
>(({ className, src, ...props }, ref) => (
<AvatarPrimitive.Image
<Image
ref={ref}
className={cn("aspect-square h-full w-full", className)}
src={STRAPI_URL + "/_next/image?url=" + src + "&w=100&q=100"}
src={src}
{...props}
/>
));
Expand Down

0 comments on commit 74fc343

Please sign in to comment.