fix: guest profile picture fallback not working

This commit is contained in:
trafficlunar 2025-08-20 21:10:31 +01:00
parent 19a7e83403
commit 5dde6001fa
5 changed files with 20 additions and 20 deletions

View file

@ -1,11 +1,11 @@
"use client";
import Image from "next/image";
import { redirect } from "next/navigation";
import { useState } from "react";
import { ReportReason, User } from "@prisma/client";
import ProfilePicture from "../profile-picture";
import ReasonSelector from "./reason-selector";
import SubmitButton from "../submit-button";
@ -43,13 +43,7 @@ export default function ReportUserForm({ user }: Props) {
<hr className="border-zinc-300" />
<div className="bg-orange-100 rounded-xl border-2 border-orange-400 flex p-4 gap-4">
<Image
src={user.image ?? "/missing.svg"}
alt="profile picture"
width={96}
height={96}
className="aspect-square rounded-full border-2 border-orange-400"
/>
<ProfilePicture src={user.image ?? "/guest.webp"} width={96} height={96} className="aspect-square rounded-full border-2 border-orange-400" />
<div className="flex flex-col justify-center">
<p className="text-xl font-bold overflow-hidden text-ellipsis">{user.name}</p>
<p className="text-sm font-bold overflow-hidden text-ellipsis">@{user.username}</p>