From 7c33e522385e64d6a8019e68c5fe56adfb83cb1c Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Tue, 26 Dec 2023 01:39:44 +0100 Subject: [PATCH] [examples] Simplify Next.js example --- examples/base-ui-nextjs-tailwind-ts/next.config.js | 5 +---- examples/base-ui-nextjs-tailwind-ts/src/app/layout.tsx | 3 ++- examples/joy-ui-nextjs-ts/next.config.js | 5 +---- examples/joy-ui-nextjs-ts/src/app/layout.tsx | 3 ++- examples/material-ui-nextjs-ts/next.config.js | 7 ------- examples/material-ui-nextjs/next.config.js | 7 ------- 6 files changed, 6 insertions(+), 24 deletions(-) diff --git a/examples/base-ui-nextjs-tailwind-ts/next.config.js b/examples/base-ui-nextjs-tailwind-ts/next.config.js index 3d3bc9990d8b56..658404ac690c0c 100644 --- a/examples/base-ui-nextjs-tailwind-ts/next.config.js +++ b/examples/base-ui-nextjs-tailwind-ts/next.config.js @@ -1,7 +1,4 @@ /** @type {import('next').NextConfig} */ -const nextConfig = { - reactStrictMode: true, - swcMinify: true, -}; +const nextConfig = {}; module.exports = nextConfig; diff --git a/examples/base-ui-nextjs-tailwind-ts/src/app/layout.tsx b/examples/base-ui-nextjs-tailwind-ts/src/app/layout.tsx index 798fd9d1f8bde9..26c050649fc5f7 100644 --- a/examples/base-ui-nextjs-tailwind-ts/src/app/layout.tsx +++ b/examples/base-ui-nextjs-tailwind-ts/src/app/layout.tsx @@ -13,7 +13,8 @@ export const metadata = { description: 'Generated by create next app', }; -export default function RootLayout({ children }: { children: React.ReactNode }) { +export default function RootLayout(props: { children: React.ReactNode }) { + const { children } = props; return ( {children} diff --git a/examples/joy-ui-nextjs-ts/next.config.js b/examples/joy-ui-nextjs-ts/next.config.js index 3d3bc9990d8b56..658404ac690c0c 100644 --- a/examples/joy-ui-nextjs-ts/next.config.js +++ b/examples/joy-ui-nextjs-ts/next.config.js @@ -1,7 +1,4 @@ /** @type {import('next').NextConfig} */ -const nextConfig = { - reactStrictMode: true, - swcMinify: true, -}; +const nextConfig = {}; module.exports = nextConfig; diff --git a/examples/joy-ui-nextjs-ts/src/app/layout.tsx b/examples/joy-ui-nextjs-ts/src/app/layout.tsx index 7728f51f70ebdf..26699aa8b18231 100644 --- a/examples/joy-ui-nextjs-ts/src/app/layout.tsx +++ b/examples/joy-ui-nextjs-ts/src/app/layout.tsx @@ -6,7 +6,8 @@ export const metadata = { description: 'Generated by create next app', }; -export default function RootLayout({ children }: { children: React.ReactNode }) { +export default function RootLayout(props: { children: React.ReactNode }) { + const { children } = props; return ( diff --git a/examples/material-ui-nextjs-ts/next.config.js b/examples/material-ui-nextjs-ts/next.config.js index bdb623cc18ba74..f8eba80f719632 100644 --- a/examples/material-ui-nextjs-ts/next.config.js +++ b/examples/material-ui-nextjs-ts/next.config.js @@ -1,12 +1,5 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - reactStrictMode: true, - swcMinify: true, - modularizeImports: { - '@mui/icons-material': { - transform: '@mui/icons-material/{{member}}', - }, - }, images: { remotePatterns: [ { diff --git a/examples/material-ui-nextjs/next.config.js b/examples/material-ui-nextjs/next.config.js index bdb623cc18ba74..f8eba80f719632 100644 --- a/examples/material-ui-nextjs/next.config.js +++ b/examples/material-ui-nextjs/next.config.js @@ -1,12 +1,5 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - reactStrictMode: true, - swcMinify: true, - modularizeImports: { - '@mui/icons-material': { - transform: '@mui/icons-material/{{member}}', - }, - }, images: { remotePatterns: [ {