Maybe fixed crashing when loading new avatars

This commit is contained in:
Liam 2022-10-03 07:57:50 +01:00
parent b30e017db1
commit 632490d520
2 changed files with 21 additions and 2 deletions

View File

@ -1,8 +1,27 @@
import Image from "next/image";
/**
*
* placeholder?: PlaceholderValue;
blurDataURL?: string;
unoptimized?: boolean;
* @param {*} props
* @returns
*/
const Avatar = (props) => {
return <>
<Image className={'player-avatar'} src={props.url} width={180} height={180} alt={'Avatar image'} loading='lazy'/>
<Image
className={'player-avatar'}
src={props.url}
width={180}
height={180}
alt={'Avatar image'}
loading='lazy'
placeholder="blur"
blurDataURL="https://cdn.fascinated.cc/MhCUeHZLsh.webp?raw=true"
unoptimized={true}
/>
</>
}

View File

@ -4,7 +4,7 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start -p 3001",
"start": "npm i && next build && next start -p 3001",
"lint": "next lint"
},
"dependencies": {