fix: native img instead of nextjs/image

This commit is contained in:
ner committed 2024-10-16 22:49:01 +03:00
1 parent 8cb7fed6ef
commit 2dadc83eef
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -2,6 +2,7 @@
"extends": ["next/core-web-vitals", "plugin:tailwindcss/recommended"], "extends": ["next/core-web-vitals", "plugin:tailwindcss/recommended"],
"plugins": ["simple-import-sort", "tailwindcss"], "plugins": ["simple-import-sort", "tailwindcss"],
"rules": { "rules": {
"@next/next/no-img-element": "off",
"tailwindcss/classnames-order": "error", "tailwindcss/classnames-order": "error",
"simple-import-sort/imports": "error", "simple-import-sort/imports": "error",
"simple-import-sort/exports": "error", "simple-import-sort/exports": "error",
@@ -9,7 +10,6 @@
}, },
"settings": { "settings": {
"tailwindcss": { "tailwindcss": {
// Tailwind config path, relative to the project root
"config": "./tailwind.config.js" "config": "./tailwind.config.js"
} }
}, },
+1 -1
View File
@@ -38,7 +38,7 @@ const Credits: FC<Props> = ({ showId, showType = 'movie', onPersonClick }) => {
> >
<div className='overflow-hidden rounded-lg'> <div className='overflow-hidden rounded-lg'>
{actor.profile_path ? ( {actor.profile_path ? (
<Image unoptimized height={180} width={120} src={actor.photoUrl} alt={actor.name} /> <img height={180} width={120} src={actor.photoUrl} alt={actor.name} />
) : ( ) : (
<div className='flex h-[180px] w-[120px] items-center justify-center rounded-lg'> <div className='flex h-[180px] w-[120px] items-center justify-center rounded-lg'>
<User2 size={120} strokeWidth={1} /> <User2 size={120} strokeWidth={1} />
@@ -47,7 +47,7 @@ const showPlayer = create(({ onResolve, magnet, backdrop, title }: Props) => {
</div> </div>
{(!isReady || isLoading) && ( {(!isReady || isLoading) && (
<div className='absolute left-0 top-0 size-full'> <div className='absolute left-0 top-0 size-full'>
<Image unoptimized src={backdrop} fill className='absolute left-0 top-0 size-full' alt={title} /> <img src={backdrop} className='absolute left-0 top-0 size-full' alt={title} />
<div className='absolute left-0 top-0 flex size-full items-center justify-center bg-black/80'> <div className='absolute left-0 top-0 flex size-full items-center justify-center bg-black/80'>
<div className='animate-spin'> <div className='animate-spin'>
<Loader color='white' /> <Loader color='white' />
+1 -1
View File
@@ -26,7 +26,7 @@ const Show: FC<Props> = ({ show, onClick, className, containerProps }) => {
)} )}
> >
<div className='flex size-full'> <div className='flex size-full'>
<Image unoptimized className='size-full rounded-lg object-cover' fill src={show.poster} alt={show.title} /> <img className='size-full rounded-lg object-cover' src={show.poster} alt={show.title} />
</div> </div>
<div className='absolute left-0 top-0 flex size-full flex-col justify-between rounded-md bg-vignette p-2 text-white'> <div className='absolute left-0 top-0 flex size-full flex-col justify-between rounded-md bg-vignette p-2 text-white'>
<Handlers show={show} onClick={onClick} /> <Handlers show={show} onClick={onClick} />