Skip to content

Commit 7fa7f81

Browse files
committed
some changes
1 parent 5137268 commit 7fa7f81

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

.eslintrc.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
{
2-
"extends": ["next/core-web-vitals", "next/typescript"]
2+
"extends": ["next/core-web-vitals", "next/typescript"],
3+
"rules": {
4+
"@typescript-eslint/no-unused-vars": "warn",
5+
"@typescript-eslint/no-explicit-any": "warn",
6+
"@next/next/no-img-element": "warn"
7+
}
38
}

app/components/VariantButton.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import Image from 'next/image';
2+
13
interface VariantButtonProps {
24
variant: string;
35
isSelected: boolean;
@@ -12,10 +14,12 @@ export function VariantButton({ variant, isSelected, onClick }: VariantButtonPro
1214
isSelected ? 'border-blue-500' : 'border-gray-200'
1315
}`}
1416
>
15-
<img
17+
<Image
1618
src={variant}
1719
alt="Character variant"
18-
className="w-full h-full object-cover"
20+
width={64}
21+
height={64}
22+
className="w-full h-full object-cover"
1923
/>
2024
</button>
2125
);

next.config.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
4-
/* config options here */
4+
images: {
5+
domains: ['localhost'],
6+
unoptimized: true
7+
}
58
};
69

710
export default nextConfig;

0 commit comments

Comments
 (0)