Skip to content

Commit 7d0ad55

Browse files
authored
fix: missing promise type for params (#198)
1 parent 9b1bcb3 commit 7d0ad55

File tree

6 files changed

+14
-12
lines changed

6 files changed

+14
-12
lines changed

app/repos/[owner]/[repo]/commits/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { RepoCommits } from '@/components/repo-commits'
22

33
interface CommitsPageProps {
4-
params: {
4+
params: Promise<{
55
owner: string
66
repo: string
7-
}
7+
}>
88
}
99

1010
export default async function CommitsPage({ params }: CommitsPageProps) {

app/repos/[owner]/[repo]/issues/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { RepoIssues } from '@/components/repo-issues'
22

33
interface IssuesPageProps {
4-
params: {
4+
params: Promise<{
55
owner: string
66
repo: string
7-
}
7+
}>
88
}
99

1010
export default async function IssuesPage({ params }: IssuesPageProps) {

app/repos/[owner]/[repo]/layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { RepoLayout } from '@/components/repo-layout'
22
import { getServerSession } from '@/lib/session/get-server-session'
33
import { getGitHubStars } from '@/lib/github-stars'
4+
import { Metadata } from 'next'
45

56
interface LayoutPageProps {
67
params: Promise<{
@@ -28,7 +29,7 @@ export default async function Layout({ params, children }: LayoutPageProps) {
2829
)
2930
}
3031

31-
export async function generateMetadata({ params }: LayoutPageProps) {
32+
export async function generateMetadata({ params }: LayoutPageProps): Promise<Metadata> {
3233
const { owner, repo } = await params
3334

3435
return {

app/repos/[owner]/[repo]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { redirect } from 'next/navigation'
22

33
interface RepoPageProps {
4-
params: {
4+
params: Promise<{
55
owner: string
66
repo: string
7-
}
7+
}>
88
}
99

1010
export default async function RepoPage({ params }: RepoPageProps) {

app/repos/[owner]/[repo]/pull-requests/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { RepoPullRequests } from '@/components/repo-pull-requests'
22

33
interface PullRequestsPageProps {
4-
params: {
4+
params: Promise<{
55
owner: string
66
repo: string
7-
}
7+
}>
88
}
99

1010
export default async function PullRequestsPage({ params }: PullRequestsPageProps) {

app/tasks/[taskId]/page.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ import { TaskPageClient } from '@/components/task-page-client'
22
import { getServerSession } from '@/lib/session/get-server-session'
33
import { getGitHubStars } from '@/lib/github-stars'
44
import { getMaxSandboxDuration } from '@/lib/db/settings'
5+
import { Metadata } from 'next'
56

67
interface TaskPageProps {
7-
params: {
8+
params: Promise<{
89
taskId: string
9-
}
10+
}>
1011
}
1112

1213
export default async function TaskPage({ params }: TaskPageProps) {
@@ -29,7 +30,7 @@ export default async function TaskPage({ params }: TaskPageProps) {
2930
)
3031
}
3132

32-
export async function generateMetadata({ params }: TaskPageProps) {
33+
export async function generateMetadata({ params }: TaskPageProps): Promise<Metadata> {
3334
const { taskId } = await params
3435
const session = await getServerSession()
3536

0 commit comments

Comments
 (0)