Skip to content

Commit 36e4216

Browse files
committed
feat: update page props to use Promise and enhance ESLint configuration
1 parent 21ee885 commit 36e4216

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

app/[category]/page.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ import { blocks, categories } from '@/data/blocks'
33
import { notFound } from 'next/navigation'
44

55
interface PageProps {
6-
params: {
7-
category: string
8-
}
6+
params: Promise<{ category: string }>
97
}
108

119
export async function generateStaticParams() {

eslint.config.mjs

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1-
import { dirname } from "path";
2-
import { fileURLToPath } from "url";
3-
import { FlatCompat } from "@eslint/eslintrc";
1+
import { dirname } from 'path'
2+
import { fileURLToPath } from 'url'
3+
import { FlatCompat } from '@eslint/eslintrc'
44

5-
const __filename = fileURLToPath(import.meta.url);
6-
const __dirname = dirname(__filename);
5+
const __filename = fileURLToPath(import.meta.url)
6+
const __dirname = dirname(__filename)
77

88
const compat = new FlatCompat({
9-
baseDirectory: __dirname,
10-
});
9+
baseDirectory: __dirname,
10+
})
1111

1212
const eslintConfig = [
13-
...compat.extends("next/core-web-vitals", "next/typescript"),
14-
];
13+
...compat.config({
14+
extends: ['next/core-web-vitals', 'next', 'next/typescript'],
15+
rules: {
16+
'react/no-unescaped-entities': 'off',
17+
'@next/next/no-page-custom-font': 'off',
18+
},
19+
}),
20+
]
1521

16-
export default eslintConfig;
22+
export default eslintConfig

0 commit comments

Comments
 (0)