Skip to content

Commit

Permalink
fix ts warnings for <img
Browse files Browse the repository at this point in the history
  • Loading branch information
docimin committed Jun 24, 2024
1 parent b207e6b commit 9a76799
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export default function FetchGallery({ singleGallery }) {
return (
<div className="flex-wrap items-center justify-center gap-4 p-8">
<div className="mx-auto flex">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={getGalleryImageUrl(singleGallery.galleryId)}
alt={singleGallery.imgAlt || 'Headpat Community Image'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export default function UploadPage() {
>
<div className="text-center">
<Label className="rounded-md bg-gray-900 font-semibold text-white focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 focus-within:ring-offset-gray-900 hover:text-indigo-500">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
id="selected-image"
className="mx-auto h-96 min-w-full rounded-md object-contain cursor-pointer"
Expand Down
2 changes: 2 additions & 0 deletions src/app/[locale]/(account)/account/idcard/page.client.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export default function PageClient() {
{error && <ErrorMessage attentionError={error} />}
<div className="mx-auto my-8 max-w-7xl text-center">
{/* TODO: Change image */}
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src="/images/badgefront.webp"
alt="Badge Preview"
Expand Down Expand Up @@ -195,6 +196,7 @@ export default function PageClient() {
onDrop={handleDrop}
onDragOver={(event) => event.preventDefault()}
>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
id="selected-image"
className="h-32 w-32 rounded-md object-contain"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default async function Page({
}}
passHref
>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
className="mr-4 h-12 w-12 flex-none rounded-full"
src={getAvatarImageUrl(
Expand Down
13 changes: 8 additions & 5 deletions src/app/[locale]/(main)/gallery/[galleryId]/page.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ export default function FetchGallery({ name, gallery }) {

// The rest of the component remains unchanged with conditional rendering based on the data's availability.
return (
<img
src={url}
alt={name || 'Headpat Community Image'}
className={`imgsinglegallery mx-auto h-[400px] w-auto max-w-full rounded-lg object-contain`}
/>
<>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={url}
alt={name || 'Headpat Community Image'}
className={`imgsinglegallery mx-auto h-[400px] w-auto max-w-full rounded-lg object-contain`}
/>
</>
)
}
1 change: 1 addition & 0 deletions src/components/account/profile/mfaAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export default function MfaAlert({ mfaList }) {
<div>
{mfaMode === 'totpEnable' && (
<>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={qrCodeImage}
className={'h-64 w-auto mb-4'}
Expand Down
1 change: 1 addition & 0 deletions src/components/account/uploadAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export default function UploadAvatar({
<span>Profile image</span>
<div className="grid grid-cols-1 gap-x-6 gap-y-8 sm:max-w-xl sm:grid-cols-6">
<div className="col-span-full flex items-center gap-x-8">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
id="avatar-image"
src={
Expand Down
1 change: 1 addition & 0 deletions src/components/account/uploadBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export default function UploadBanner({
<span>Banner image</span>
<div className="grid grid-cols-1 gap-x-6 gap-y-8 sm:max-w-xl sm:grid-cols-6">
<div className="col-span-full flex items-center gap-x-8">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
id="banner-image"
src={
Expand Down

0 comments on commit 9a76799

Please sign in to comment.