Skip to content

Commit 9c09d54

Browse files
committed
feat: pump nextjs version
1 parent 20efa56 commit 9c09d54

File tree

17 files changed

+54
-57
lines changed

17 files changed

+54
-57
lines changed

apps/web/app/(public-fullwidth)/author/[authorId]/followers/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const metadata = {
88
}
99

1010
export default async function Page(props: { params: Promise<{ authorId: string }> }) {
11-
const params = await props.params;
11+
const params = await props.params
1212
const author = await getUserById(params?.authorId as string)
1313

1414
return (

apps/web/app/(public-fullwidth)/author/[authorId]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const metadata = {
88
}
99

1010
export default async function Page(props: { params: Promise<{ authorId: string }> }) {
11-
const params = await props.params;
11+
const params = await props.params
1212
const author = await getUserById(params?.authorId as string)
1313

1414
return (

apps/web/app/[lang]/(protected-post)/user/posts/[postId]/edit/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { getPost } from "database"
55
import PostForm from "@/molecules/post-form"
66

77
export async function generateMetadata(props): Promise<Metadata> {
8-
const params = await props.params;
8+
const params = await props.params
99
const post = await getPost({ postIdOrSlug: params?.postId as string })
1010

1111
return {
@@ -15,7 +15,7 @@ export async function generateMetadata(props): Promise<Metadata> {
1515
}
1616

1717
export default async function Page(props: { params: Promise<{ postId: string }> }) {
18-
const params = await props.params;
18+
const params = await props.params
1919
const post = await getPost({ postIdOrSlug: params?.postId as string })
2020

2121
return <PostForm post={post?.data} />

apps/web/app/[lang]/(public)/search/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ import SearchBar from "@/molecules/nav/search-bar"
88
import PostList from "@/molecules/posts/post-list"
99

1010
export async function generateMetadata(props): Promise<Metadata> {
11-
const searchParams = await props.searchParams;
11+
const searchParams = await props.searchParams
1212
return {
1313
title: `${searchParams?.search} - Search results`,
1414
description: `Search results for "${searchParams?.search}"`,
1515
}
1616
}
1717

1818
export default async function Page(props) {
19-
const searchParams = await props.searchParams;
19+
const searchParams = await props.searchParams
2020
const t = await getTranslations({
2121
namespace: "common",
2222
})

apps/web/app/[lang]/(public-fullwidth)/author/[authorId]/followers/page.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ import UserProfile from "@/molecules/follower/user-profile"
66
import { TUserItem } from "@/types/users"
77
import { generatePath } from "@/utils/generatePath"
88

9-
export async function generateMetadata(
10-
props: {
11-
params: Promise<{ authorId: string }>
12-
}
13-
): Promise<Metadata> {
14-
const params = await props.params;
9+
export async function generateMetadata(props: {
10+
params: Promise<{ authorId: string }>
11+
}): Promise<Metadata> {
12+
const params = await props.params
1513
const rawAuthor = await fetch(
1614
`${process.env.NEXT_PUBLIC_FRONTEND_URL}${generatePath(APP_APIS.protected.user.GET, {
1715
userId: params?.authorId,
@@ -33,7 +31,7 @@ export async function generateMetadata(
3331
}
3432

3533
export default async function Page(props: { params: Promise<{ authorId: string }> }) {
36-
const params = await props.params;
34+
const params = await props.params
3735
return (
3836
<div className="grid grid-cols-12 gap-10">
3937
<UserProfile authorId={params?.authorId} />

apps/web/app/[lang]/(public-fullwidth)/author/[authorId]/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { getUser } from "database"
33
import UserProfile from "@/molecules/follower/user-profile"
44
import PostList from "@/molecules/posts/post-list"
55

6-
export const generateMetadata = async props => {
7-
const params = await props.params;
6+
export const generateMetadata = async (props) => {
7+
const params = await props.params
88
const { data: author, error } = await getUser({
99
where: {
1010
id: params?.authorId,
@@ -18,8 +18,8 @@ export const generateMetadata = async props => {
1818
}
1919

2020
export default async function Page(props) {
21-
const searchParams = await props.searchParams;
22-
const params = await props.params;
21+
const searchParams = await props.searchParams
22+
const params = await props.params
2323
return (
2424
<div className="grid grid-cols-12 gap-10">
2525
<UserProfile authorId={params?.authorId} />

apps/web/app/[lang]/(public-fullwidth)/posts/[postId]/page.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { auth } from "configs/auth"
1414
import { getPost, PostStatus } from "database"
1515

1616
export async function generateMetadata(props): Promise<Metadata> {
17-
const params = await props.params;
17+
const params = await props.params
1818
const post = await getPost({ postIdOrSlug: params?.postId })
1919

2020
return {
@@ -23,14 +23,12 @@ export async function generateMetadata(props): Promise<Metadata> {
2323
}
2424
}
2525

26-
export default async function Page(
27-
props: {
28-
params: Promise<{ postId: string }>
29-
searchParams: Promise<TSearchParams>
30-
}
31-
) {
32-
const searchParams = await props.searchParams;
33-
const params = await props.params;
26+
export default async function Page(props: {
27+
params: Promise<{ postId: string }>
28+
searchParams: Promise<TSearchParams>
29+
}) {
30+
const searchParams = await props.searchParams
31+
const params = await props.params
3432
const post = await getPost({ postIdOrSlug: params?.postId })
3533
const session = await auth()
3634

apps/web/app/[lang]/(public-fullwidth)/tags/[tagId]/follower/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const metadata = {
77
}
88

99
export default async function Page(props: { params: Promise<{ tagId: string }> }) {
10-
const params = await props.params;
10+
const params = await props.params
1111
const tag = await getTagById(params?.tagId as string)
1212

1313
return (

apps/web/app/[lang]/(public-fullwidth)/tags/[tagId]/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { getTag } from "database"
33
import PostList from "@/molecules/posts/post-list"
44
import TagDetail from "@/molecules/tag/tag-detail"
55

6-
export const generateMetadata = async props => {
7-
const params = await props.params;
6+
export const generateMetadata = async (props) => {
7+
const params = await props.params
88
const { data: tag, error } = await getTag({
99
tagIdOrSlug: params?.tagId,
1010
})
@@ -16,7 +16,7 @@ export const generateMetadata = async props => {
1616
}
1717

1818
export default async function Page(props) {
19-
const params = await props.params;
19+
const params = await props.params
2020
return (
2121
<div className="grid grid-cols-12 gap-10">
2222
<TagDetail tagIdOrSlug={params?.tagId} />

apps/web/app/[lang]/layout.tsx

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { use } from "react";
1+
import { use } from "react"
2+
23
import "./globals.css"
34
import "ui/dist/index.css"
45
import "react-toastify/dist/ReactToastify.css"
@@ -16,21 +17,15 @@ export const metadata = {
1617
},
1718
}
1819

19-
export default function RootLayout(
20-
props: {
21-
params: Promise<{ lang: string }>
22-
children: React.ReactNode
23-
}
24-
) {
25-
const params = use(props.params);
26-
27-
const {
28-
lang
29-
} = params;
30-
31-
const {
32-
children
33-
} = props;
20+
export default function RootLayout(props: {
21+
params: Promise<{ lang: string }>
22+
children: React.ReactNode
23+
}) {
24+
const params = use(props.params)
25+
26+
const { lang } = params
27+
28+
const { children } = props
3429

3530
const messages = useMessages()
3631

0 commit comments

Comments
 (0)