feat: Next.js 16 migration
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
"use client";
|
||||
|
||||
import { AppShell } from "@mantine/core";
|
||||
import { ReactElement } from "react";
|
||||
import { ReactNode } from "react";
|
||||
import Footer from "./footer/Footer";
|
||||
import { Header } from "./header/Header";
|
||||
|
||||
type MainLayoutProps = {
|
||||
children: ReactElement;
|
||||
children: ReactNode;
|
||||
};
|
||||
|
||||
export default function MainLayout(props: MainLayoutProps) {
|
||||
|
||||
@@ -3,7 +3,7 @@ import "@mantine/core/styles.css";
|
||||
import "@mantine/dates/styles.css";
|
||||
import { Notifications } from "@mantine/notifications";
|
||||
import "@mantine/notifications/styles.css";
|
||||
import { ReactElement } from "react";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
import { ColorSchemeScript, mantineHtmlProps } from "@mantine/core";
|
||||
import MainLayout from "./components/layout/MainLayout";
|
||||
@@ -14,7 +14,7 @@ export const metadata = {
|
||||
description: "Free and open fuel price analysis",
|
||||
};
|
||||
|
||||
export default function RootLayout({ children }: { children: ReactElement }) {
|
||||
export default function RootLayout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<html lang="en" {...mantineHtmlProps}>
|
||||
<head>
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
|
||||
import nextTypescript from "eslint-config-next/typescript";
|
||||
import globals from "globals";
|
||||
import pluginJs from "@eslint/js";
|
||||
import tseslint from "typescript-eslint";
|
||||
import pluginReact from "eslint-plugin-react";
|
||||
|
||||
export default [
|
||||
...nextCoreWebVitals,
|
||||
...nextTypescript,
|
||||
{ files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"] },
|
||||
{ languageOptions: { globals: globals.browser } },
|
||||
pluginJs.configs.recommended,
|
||||
@@ -14,4 +18,7 @@ export default [
|
||||
"react/react-in-jsx-scope": "off",
|
||||
},
|
||||
},
|
||||
{
|
||||
ignores: ["node_modules/**", ".next/**", "out/**", "build/**", "next-env.d.ts"]
|
||||
}
|
||||
];
|
||||
|
||||
3
frontend/next-env.d.ts
vendored
3
frontend/next-env.d.ts
vendored
@@ -1,5 +1,6 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
import "./.next/dev/types/routes.d.ts";
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
swcMinify: true,
|
||||
experimental: {
|
||||
optimizePackageImports: ["@mantine/core", "@mantine/hooks"],
|
||||
},
|
||||
|
||||
3335
frontend/package-lock.json
generated
3335
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
"lint": "eslint .",
|
||||
"generate": "openapi-generator-cli generate -i http://localhost:5161/swagger/v1/swagger.json -g typescript-axios -o ./generated --additional-properties=supportsES6=true,useSingleRequestParameter=true,typescriptThreePlus=true"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -22,29 +22,33 @@
|
||||
"dayjs": "^1.11.18",
|
||||
"dayjs-plugin-utc": "^0.1.2",
|
||||
"leaflet": "^1.9.4",
|
||||
"next": "^14.2.33",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"next": "16.0.0",
|
||||
"react": "19.2.0",
|
||||
"react-dom": "19.2.0",
|
||||
"react-icons": "^5.5.0",
|
||||
"react-leaflet": "^4.2.1",
|
||||
"recharts": "^2.15.4",
|
||||
"sharp": "^0.33.5"
|
||||
"react-leaflet": "latest",
|
||||
"recharts": "^3.3.0",
|
||||
"sharp": "^0.34.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.38.0",
|
||||
"@types/leaflet": "^1.9.21",
|
||||
"@types/node": "^22.18.12",
|
||||
"@types/react": "^18.3.26",
|
||||
"@types/react-dom": "^18.3.7",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-next": "^15.5.6",
|
||||
"@types/node": "^24.9.1",
|
||||
"@types/react": "19.2.2",
|
||||
"@types/react-dom": "19.2.2",
|
||||
"eslint": "^9.38.0",
|
||||
"eslint-config-next": "16.0.0",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"globals": "^15.15.0",
|
||||
"globals": "^16.4.0",
|
||||
"postcss": "^8.5.6",
|
||||
"postcss-preset-mantine": "^1.18.0",
|
||||
"postcss-simple-vars": "^7.0.1",
|
||||
"typescript": "^5.9.3",
|
||||
"typescript-eslint": "^8.46.2"
|
||||
},
|
||||
"packageManager": "pnpm@10.13.1"
|
||||
"packageManager": "pnpm@10.19.0",
|
||||
"overrides": {
|
||||
"@types/react": "19.2.2",
|
||||
"@types/react-dom": "19.2.2"
|
||||
}
|
||||
}
|
||||
|
||||
1602
frontend/pnpm-lock.yaml
generated
1602
frontend/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,7 @@
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"jsx": "react-jsx",
|
||||
"incremental": true,
|
||||
"plugins": [
|
||||
{
|
||||
@@ -28,7 +28,8 @@
|
||||
"next-env.d.ts",
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
".next/types/**/*.ts"
|
||||
".next/types/**/*.ts",
|
||||
".next/dev/types/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
|
||||
Reference in New Issue
Block a user