diff --git a/package.json b/package.json index b527778..b054686 100644 --- a/package.json +++ b/package.json @@ -15,19 +15,23 @@ "@swc/cli": "^0.1.63", "@swc/core": "^1.3.101", "@types/centra": "^2.2.3", + "@types/node": "*", "@types/react": "^18.0.23", "@types/react-dom": "^18.0.7", "cross-env": "^7.0.3", "nodemon": "^3.0.2", - "ts-node": "^10.9.2" + "ts-node": "^10.9.2", + "typescript": ">=2.7" }, "dependencies": { + "@emotion/cache": "^11.11.0", "@emotion/react": "^11.11.3", "@emotion/styled": "^11.11.0", "@fontsource/roboto": "^5.0.8", "@libsql/client": "0.3.6", "@mui/icons-material": "^5.15.2", "@mui/material": "^5.15.2", + "@mui/material-nextjs": "^5.15.0", "@prisma/adapter-libsql": "^5.7.1", "@prisma/client": "5.7.1", "@thunder04/supermap": "^3.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 486dffc..1b10118 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,10 +1,9 @@ lockfileVersion: '6.0' -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - dependencies: + '@emotion/cache': + specifier: ^11.11.0 + version: 11.11.0 '@emotion/react': specifier: ^11.11.3 version: 11.11.3(@types/react@18.2.45)(react@18.2.0) @@ -23,6 +22,9 @@ dependencies: '@mui/material': specifier: ^5.15.2 version: 5.15.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(@types/react@18.2.45)(react-dom@18.2.0)(react@18.2.0) + '@mui/material-nextjs': + specifier: ^5.15.0 + version: 5.15.0(@emotion/cache@11.11.0)(@mui/material@5.15.2)(@types/react@18.2.45)(next@14.0.4)(react@18.2.0) '@prisma/adapter-libsql': specifier: ^5.7.1 version: 5.7.1(@libsql/client@0.3.6) @@ -70,6 +72,9 @@ devDependencies: '@types/centra': specifier: ^2.2.3 version: 2.2.3 + '@types/node': + specifier: '*' + version: 20.10.5 '@types/react': specifier: ^18.0.23 version: 18.2.45 @@ -85,6 +90,9 @@ devDependencies: ts-node: specifier: ^10.9.2 version: 10.9.2(@swc/core@1.3.101)(@types/node@20.10.5)(typescript@5.3.3) + typescript: + specifier: '>=2.7' + version: 5.3.3 packages: @@ -333,7 +341,7 @@ packages: resolution: {integrity: sha512-ebbEtlI7dxXF5ziNdr05mOY8NnDiPB1XvAlLHctRt/Rc+C3LCOVW5imUVX+mhvUhnNzmPBHewUkOFgGlCxgdAA==} dependencies: ajv: 8.12.0 - ajv-formats: 2.1.1(ajv@8.12.0) + ajv-formats: 2.1.1 fast-uri: 2.3.0 dev: false @@ -562,6 +570,31 @@ packages: react: 18.2.0 dev: false + /@mui/material-nextjs@5.15.0(@emotion/cache@11.11.0)(@mui/material@5.15.2)(@types/react@18.2.45)(next@14.0.4)(react@18.2.0): + resolution: {integrity: sha512-UC3lnoRqJXoWUBeekqjxC4CpxMElz4D4bBCegOhrm80qGV1cP5TBJGjalqoSUq6HSl+COVv6u//AjjIMKCj/qA==} + engines: {node: '>=12.0.0'} + peerDependencies: + '@emotion/cache': ^11.11.0 + '@emotion/server': ^11.11.0 + '@mui/material': ^5.0.0 + '@types/react': ^17.0.0 || ^18.0.0 + next: ^13.0.0 || ^14.0.0 + react: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@emotion/cache': + optional: true + '@emotion/server': + optional: true + '@types/react': + optional: true + dependencies: + '@emotion/cache': 11.11.0 + '@mui/material': 5.15.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(@types/react@18.2.45)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.45 + next: 14.0.4(react-dom@18.2.0)(react@18.2.0) + react: 18.2.0 + dev: false + /@mui/material@5.15.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(@types/react@18.2.45)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-JnoIrpNmEHG5uC1IyEdgsnDiaiuCZnUIh7f9oeAr87AvBmNiEJPbo7XrD7kBTFWwp+b97rQ12QdSs9CLhT2n/A==} engines: {node: '>=12.0.0'} @@ -842,7 +875,7 @@ packages: /@prisma/driver-adapter-utils@5.7.1: resolution: {integrity: sha512-q4cWte5QYCH4RCeo/UBKVG4HvqjG7YoSrNmn2fzWU6da5cCqw9h8MIGO+Jkpb6S5ySSTW32t63khujYvytXsYg==} dependencies: - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4 transitivePeerDependencies: - supports-color dev: false @@ -1187,10 +1220,8 @@ packages: hasBin: true dev: true - /ajv-formats@2.1.1(ajv@8.12.0): + /ajv-formats@2.1.1: resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} - peerDependencies: - ajv: ^8.0.0 peerDependenciesMeta: ajv: optional: true @@ -1253,7 +1284,7 @@ packages: resolution: {integrity: sha512-TAlMYvOuwGyLK3PfBb5WKBXZmXz2fVCgv23d6zZFdle/q3gPjmxBaeuC0pY0Dzs5PWMSgfqqEZkrye19GlDTgw==} dependencies: archy: 1.0.0 - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4 fastq: 1.16.0 transitivePeerDependencies: - supports-color @@ -1494,6 +1525,18 @@ packages: engines: {node: '>= 12'} dev: false + /debug@4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + dev: false + /debug@4.3.4(supports-color@5.5.0): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -1505,6 +1548,7 @@ packages: dependencies: ms: 2.1.2 supports-color: 5.5.0 + dev: true /decompress-response@6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} @@ -1694,7 +1738,7 @@ packages: dependencies: '@fastify/deepmerge': 1.3.0 ajv: 8.12.0 - ajv-formats: 2.1.1(ajv@8.12.0) + ajv-formats: 2.1.1 fast-deep-equal: 3.1.3 fast-uri: 2.3.0 json-schema-ref-resolver: 1.0.1 @@ -2993,3 +3037,7 @@ packages: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} dev: true + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false diff --git a/src/app/layout.tsx b/src/app/layout.tsx index ffcc899..0a1d10e 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,7 +1,7 @@ -import { Head } from "next/document" import React from "react" import Theme from "../components/theme" import type { Metadata } from 'next' +import { AppRouterCacheProvider } from '@mui/material-nextjs/v14-appRouter' export const metadata: Metadata = { title: { @@ -30,9 +30,11 @@ export default function RootLayout({ return ( + {children} + ) diff --git a/src/app/page.tsx b/src/app/page.tsx index f65c196..e0efdaf 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,3 +1,4 @@ +"use client"; import ResponsiveAppBar from '../components/Appbar' import { Link } from '@mui/material'; diff --git a/src/website/index.ts b/src/website/index.ts index ca2eeac..bf7a6cf 100644 --- a/src/website/index.ts +++ b/src/website/index.ts @@ -4,7 +4,7 @@ import next from "next"; import { parse } from 'url'; const dev = process.env.NODE_ENV !== 'production'; -const app = next({ dev }); +const app = next({ dev, customServer: true }); const handle = app.getRequestHandler(); class Website { constructor(private app: FastifyInstance) { }