Maybe fixed crashing when loading new avatars
This commit is contained in:
parent
b30e017db1
commit
632490d520
@ -1,8 +1,27 @@
|
|||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* placeholder?: PlaceholderValue;
|
||||||
|
blurDataURL?: string;
|
||||||
|
unoptimized?: boolean;
|
||||||
|
* @param {*} props
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
|
||||||
const Avatar = (props) => {
|
const Avatar = (props) => {
|
||||||
return <>
|
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}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start -p 3001",
|
"start": "npm i && next build && next start -p 3001",
|
||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
Reference in New Issue
Block a user