Skip to content

Commit

Permalink
⬆️ Update to Next 15 RC 2
Browse files Browse the repository at this point in the history
  • Loading branch information
n1ckoates committed Oct 16, 2024
1 parent 00906f7 commit 10b4c17
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 67 deletions.
16 changes: 8 additions & 8 deletions app/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ import "./code.css";

export const dynamicParams = false; // Blog posts are static, don't attempt to generate dynamic routes

export default async function Post({ params }: { params: { slug: string } }) {
const post = allPosts.find((post) => post._meta.path === params.slug);
type Props = { params: Promise<{ slug: string }> };

export default async function Post(props: Props) {
const { slug } = await props.params;
const post = allPosts.find((post) => post._meta.path === slug);
if (!post) notFound();

return (
Expand All @@ -26,12 +29,9 @@ export async function generateStaticParams() {
return allPosts.map((post) => ({ slug: post._meta.path }));
}

export async function generateMetadata({
params,
}: {
params: { slug: string };
}) {
const post = allPosts.find((post) => post._meta.path === params.slug);
export async function generateMetadata(props: Props) {
const { slug } = await props.params;
const post = allPosts.find((post) => post._meta.path === slug);

if (!post) return mergeMetadata();

Expand Down
4 changes: 2 additions & 2 deletions app/lib/mergeMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export default function mergeMetadata({
alternates: {
types: {
"application/rss+xml": "/feed.xml",
}
}
},
},
};

return metadata;
Expand Down
Binary file modified bun.lockb
Binary file not shown.
File renamed without changes.
114 changes: 57 additions & 57 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
{
"private": true,
"scripts": {
"dev": "next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint",
"format": "prettier --write ."
},
"dependencies": {
"@formkit/auto-animate": "^0.8.2",
"@tabler/icons-react": "3.10.0",
"@tailwindcss/typography": "^0.5.13",
"@vercel/analytics": "^1.3.1",
"@vercel/speed-insights": "^1.0.12",
"autoprefixer": "^10.4.19",
"clsx": "^2.1.1",
"fuse.js": "^7.0.0",
"next": "^15.0.0-rc.0",
"next-themes": "^0.3.0",
"postcss": "^8.4.39",
"react": "^19.0.0-rc-85acf2d195-20240711",
"react-dom": "^19.0.0-rc-85acf2d195-20240711",
"react-tweet": "^3.2.1",
"remark-smartypants": "^3.0.2",
"rss": "^1.2.2",
"sharp": "0.33.4",
"sugar-high": "^0.7.0",
"tailwindcss": "^3.4.4"
},
"devDependencies": {
"@content-collections/core": "^0.6.2",
"@content-collections/mdx": "^0.1.3",
"@content-collections/next": "^0.2.0",
"@types/node": "^20.14.10",
"@types/react": "18.3.3",
"@types/react-dom": "^18.3.0",
"@types/rss": "^0.0.32",
"eslint": "^9.6.0",
"eslint-config-next": "^14.2.5",
"eslint-config-prettier": "^9.1.0",
"prettier": "^3.3.2",
"prettier-plugin-tailwindcss": "^0.6.5",
"typescript": "5.5.3"
},
"prettier": {
"useTabs": true,
"tabWidth": 4,
"plugins": [
"prettier-plugin-tailwindcss"
]
},
"eslintConfig": {
"extends": [
"next/core-web-vitals",
"prettier"
]
}
"private": true,
"scripts": {
"dev": "next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint",
"format": "prettier --write ."
},
"dependencies": {
"@formkit/auto-animate": "^0.8.2",
"@tabler/icons-react": "3.10.0",
"@tailwindcss/typography": "^0.5.13",
"@vercel/analytics": "^1.3.1",
"@vercel/speed-insights": "^1.0.12",
"autoprefixer": "^10.4.19",
"clsx": "^2.1.1",
"fuse.js": "^7.0.0",
"next": "^15.0.0-rc.1",
"next-themes": "^0.3.0",
"postcss": "^8.4.39",
"react": "^19.0.0-rc-83825814-20241015",
"react-dom": "^19.0.0-rc-83825814-20241015",
"react-tweet": "^3.2.1",
"remark-smartypants": "^3.0.2",
"rss": "^1.2.2",
"sharp": "0.33.4",
"sugar-high": "^0.7.0",
"tailwindcss": "^3.4.4"
},
"devDependencies": {
"@content-collections/core": "^0.6.2",
"@content-collections/mdx": "^0.1.3",
"@content-collections/next": "^0.2.0",
"@types/node": "^20.14.10",
"@types/react": "18.3.3",
"@types/react-dom": "^18.3.0",
"@types/rss": "^0.0.32",
"eslint": "^9.6.0",
"eslint-config-next": "^14.2.5",
"eslint-config-prettier": "^9.1.0",
"prettier": "^3.3.2",
"prettier-plugin-tailwindcss": "^0.6.5",
"typescript": "5.5.3"
},
"prettier": {
"useTabs": true,
"tabWidth": 4,
"plugins": [
"prettier-plugin-tailwindcss"
]
},
"eslintConfig": {
"extends": [
"next/core-web-vitals",
"prettier"
]
}
}

0 comments on commit 10b4c17

Please sign in to comment.