Fix lint errors

This commit is contained in:
Timothy Armes
2023-07-28 11:33:10 +02:00
parent 368e753ed7
commit b738d3d14a
5 changed files with 664 additions and 371 deletions
+1
View File
@@ -2,6 +2,7 @@
"extends": [
"next",
"next/core-web-vitals",
"plugin:react-hooks/recommended",
"prettier"
],
"globals": {
+2 -1
View File
@@ -41,7 +41,8 @@ export default async function RootLayout({
children: ReactNode;
params: { locale?: string };
}) {
const locale = useLocale();
// eslint-disable-next-line react-hooks/rules-of-hooks
const locale = useLocale(); // This hook IS allowed since it's stateless
// Show a 404 error if the user requests an unknown locale
if (params.locale !== undefined && params.locale !== locale) {
+1 -1
View File
@@ -31,7 +31,7 @@ type TournamentsDisplayProps = {
tournaments: Tournament[];
};
export default async function TournamentsDisplay({
export default function TournamentsDisplay({
tournaments,
}: TournamentsDisplayProps) {
useHydrateAtoms([[tournamentsAtom, tournaments]]);
+659 -369
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -51,6 +51,7 @@
"eslint": "8.45.0",
"eslint-config-next": "^13.4.12",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-react-hooks": "^5.0.0-canary-7118f5dd7-20230705",
"prettier": "3.0.0",
"prettier-plugin-tailwindcss": "^0.4.1"
}