From 37bef2ace5790394c220c3414db00dae9f88c9f1 Mon Sep 17 00:00:00 2001 From: Benedek Major Date: Tue, 25 Jul 2023 21:39:25 +0200 Subject: [PATCH] Replaced React image with Chackra image to fix server error Checking for a nonexistent image externally on the server side makes no sense, so we use the Chackra Image which pulls on client-side thereby preventing those image not found server errors. Also you can specify an alternate image, if the image is not found anymore, which is set to the default battle.net image. We should avoid using the react image, since I think it is meant for self-hosted images. Signed-off-by: Benedek Major --- apps/web/pages/submissions/review.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web/pages/submissions/review.tsx b/apps/web/pages/submissions/review.tsx index bd143be9..15b14cbe 100644 --- a/apps/web/pages/submissions/review.tsx +++ b/apps/web/pages/submissions/review.tsx @@ -7,6 +7,7 @@ import { useToast, Spinner, Tag, + Image as Img, } from '@chakra-ui/react'; import { useState, useEffect, ReactElement } from 'react'; import { useRouter } from 'next/router'; @@ -17,7 +18,6 @@ import { prisma } from '@server/db/client'; import TurnstileWidget from '@components/TurnstileWidget'; import Finished from '@components/Finished'; import { getSession } from 'next-auth/react'; -import Image from 'next/image'; import { games } from '@config/gameplay'; import { GameplayType } from '@utils/zod/gameplay'; interface ReviewItem { @@ -193,7 +193,7 @@ export default function Review() { {/* User Icon */} - setRefreshState(refreshState + 1)} + fallbackSrc="https://waldo.vision/battle_net.png" /> {/* Top titles */}