diff --git a/examples/next-pages-router/.nvmrc b/examples/next-pages-router/.nvmrc index 7950a445..016e34ba 100644 --- a/examples/next-pages-router/.nvmrc +++ b/examples/next-pages-router/.nvmrc @@ -1 +1 @@ -v18.17.0 +v20.17.0 diff --git a/examples/next-pages-router/README.md b/examples/next-pages-router/README.md index fc4d2353..73e5eb09 100644 --- a/examples/next-pages-router/README.md +++ b/examples/next-pages-router/README.md @@ -87,7 +87,7 @@ Next, add these fields (you don't have to modify the settings unless specified): - `details` - **Rich text** field - `date` - **Date and time** field - `author` - **Text** field (type **short text**) -- `category` - **Text** field (type **short text**) +- `categoryName` - **Text** field (type **short text**) - `heroImage` - **Media** field (type **one file**) Save the content type and continue. diff --git a/examples/next-pages-router/package.json b/examples/next-pages-router/package.json index dd67e830..68f7121e 100644 --- a/examples/next-pages-router/package.json +++ b/examples/next-pages-router/package.json @@ -3,29 +3,31 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "next dev", + "dev": "next dev --turbopack", "build": "next build", "start": "next start", "lint": "next lint" }, "dependencies": { - "@contentful/live-preview": "^3.1.0", - "@contentful/rich-text-react-renderer": "^15.19.3", + "@contentful/live-preview": "^4.5.17", "contentful": "^10.6.21", - "next": "14.2.10", - "react": "^18", - "react-dom": "^18", - "swr": "^2.2.4" + "next": "15.0.4", + "react": "19.0.0", + "react-dom": "19.0.0" }, "devDependencies": { "@types/node": "^20", - "@types/react": "^18", - "@types/react-dom": "^18", + "@types/react": "19.0.1", + "@types/react-dom": "19.0.1", "autoprefixer": "^10.0.1", "eslint": "^8", - "eslint-config-next": "14.1.0", + "eslint-config-next": "15.0.4", "postcss": "^8", "tailwindcss": "^3.3.0", "typescript": "^5" + }, + "overrides": { + "@types/react": "19.0.1", + "@types/react-dom": "19.0.1" } } diff --git a/examples/next-pages-router/pages/blogs/[slug].tsx b/examples/next-pages-router/pages/blogs/[slug].tsx index 27869721..ec4fc6c9 100644 --- a/examples/next-pages-router/pages/blogs/[slug].tsx +++ b/examples/next-pages-router/pages/blogs/[slug].tsx @@ -1,7 +1,6 @@ import { Blog, getAllBlogsWithSlug, getBlog } from '@/lib/contentful/api'; import { GetStaticPaths, GetStaticProps, GetStaticPropsContext } from 'next'; -import { documentToReactComponents } from '@contentful/rich-text-react-renderer'; import { useContentfulInspectorMode, useContentfulLiveUpdates, @@ -67,16 +66,6 @@ export default function BlogPage({ blog }: { blog: Blog }) { fieldId: 'file', })} /> -
-
-
- {documentToReactComponents(updatedBlog.fields.details)} -
-
-
diff --git a/examples/next-pages-router/styles/globals.css b/examples/next-pages-router/styles/globals.css index 875c01e8..b5c61c95 100644 --- a/examples/next-pages-router/styles/globals.css +++ b/examples/next-pages-router/styles/globals.css @@ -1,33 +1,3 @@ @tailwind base; @tailwind components; @tailwind utilities; - -:root { - --foreground-rgb: 0, 0, 0; - --background-start-rgb: 214, 219, 220; - --background-end-rgb: 255, 255, 255; -} - -@media (prefers-color-scheme: dark) { - :root { - --foreground-rgb: 255, 255, 255; - --background-start-rgb: 0, 0, 0; - --background-end-rgb: 0, 0, 0; - } -} - -body { - color: rgb(var(--foreground-rgb)); - background: linear-gradient( - to bottom, - transparent, - rgb(var(--background-end-rgb)) - ) - rgb(var(--background-start-rgb)); -} - -@layer utilities { - .text-balance { - text-wrap: balance; - } -} diff --git a/examples/next-pages-router/tsconfig.json b/examples/next-pages-router/tsconfig.json index e7ff90fd..64c21044 100644 --- a/examples/next-pages-router/tsconfig.json +++ b/examples/next-pages-router/tsconfig.json @@ -19,7 +19,8 @@ ], "paths": { "@/*": ["./*"] - } + }, + "target": "ES2017" }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "exclude": ["node_modules"]