mirror of
				https://github.com/theoludwig/theoludwig.git
				synced 2025-11-04 00:19:01 +01:00 
			
		
		
		
	build(deps): update Next.js to v15 and ESLint to v9
This commit is contained in:
		@@ -4,19 +4,20 @@ import { notFound } from "next/navigation"
 | 
			
		||||
import { getBlogPostBySlug, getBlogPosts } from "@repo/blog"
 | 
			
		||||
import { BlogPostUI } from "@repo/blog/BlogPostUI"
 | 
			
		||||
import type { Locale } from "@repo/utils/constants"
 | 
			
		||||
import { unstable_setRequestLocale } from "next-intl/server"
 | 
			
		||||
import { setRequestLocale } from "next-intl/server"
 | 
			
		||||
 | 
			
		||||
interface BlogPostPageProps {
 | 
			
		||||
  params: {
 | 
			
		||||
  params: Promise<{
 | 
			
		||||
    slug: string
 | 
			
		||||
    locale: Locale
 | 
			
		||||
  }
 | 
			
		||||
  }>
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export const generateMetadata = async (
 | 
			
		||||
  props: BlogPostPageProps,
 | 
			
		||||
): Promise<Metadata> => {
 | 
			
		||||
  const blogPost = await getBlogPostBySlug(props.params.slug)
 | 
			
		||||
  const { slug } = await props.params
 | 
			
		||||
  const blogPost = await getBlogPostBySlug(slug)
 | 
			
		||||
  if (blogPost == null) {
 | 
			
		||||
    return notFound()
 | 
			
		||||
  }
 | 
			
		||||
@@ -50,10 +51,11 @@ export const generateStaticParams = async (): Promise<
 | 
			
		||||
const BlogPostPage: React.FC<BlogPostPageProps> = async (props) => {
 | 
			
		||||
  const { params } = props
 | 
			
		||||
 | 
			
		||||
  const { locale, slug } = await params
 | 
			
		||||
  // Enable static rendering
 | 
			
		||||
  unstable_setRequestLocale(params.locale)
 | 
			
		||||
  setRequestLocale(locale)
 | 
			
		||||
 | 
			
		||||
  const blogPost = await getBlogPostBySlug(params.slug)
 | 
			
		||||
  const blogPost = await getBlogPostBySlug(slug)
 | 
			
		||||
  if (blogPost == null) {
 | 
			
		||||
    return notFound()
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user