Skip to content

Commit

Permalink
build: fix nextjs 15 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
pragmaticivan committed Dec 16, 2024
1 parent 0115845 commit 1ad71e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions app/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ export async function generateStaticParams() {
return data;
}

type Params = Promise<{ slug: string }>

export default async function ArticleView({
params,
}: Readonly<{ params: { slug: string } }>) {
const article = getArticleBySlug(params.slug, [
}: Readonly<{ params: Params }>) {
const {slug} = await params;
const article = getArticleBySlug(slug, [
'canonical_url',
'content',
'date',
Expand Down
2 changes: 1 addition & 1 deletion layouts/ArticleLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from 'react';
import React, { JSX, ReactNode } from 'react';
import { NextSeo } from 'next-seo';

type Props = {
Expand Down
2 changes: 1 addition & 1 deletion layouts/DefaultLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import React, { ReactNode } from 'react';
import React, { JSX, ReactNode } from 'react';
import { NextSeo } from 'next-seo';

type Props = {
Expand Down

0 comments on commit 1ad71e8

Please sign in to comment.