Skip to content

Commit

Permalink
Fixing code format changes and type error after nextjs 15 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceo committed Dec 9, 2024
1 parent cce1752 commit 6c4d75e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 2 additions & 0 deletions __tests__/refresh-token.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ describe.skip("Refresh token test suite", () => {
})

await testApiHandler({
// @ts-ignore
appHandler: tokenRefreshHandler,
url: `/?redirect=http://john.johnson.com/john`,
async test({ fetch }) {
Expand All @@ -66,6 +67,7 @@ describe.skip("Refresh token test suite", () => {
getIronSession.mockResolvedValue(sessionThatShouldBeRefreshed())

await testApiHandler({
// @ts-ignore
appHandler: tokenRefreshHandler,
url: `/?redirect=http://john.johnson.com/john`,
async test({ fetch }) {
Expand Down
6 changes: 2 additions & 4 deletions app/article/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ import { Suspense } from "react"
import loadArticle from "./loadArticle"

const Page = async (props: { params: Promise<{ id: string }> }) => {
const params = await props.params;
const params = await props.params

const {
id
} = params;
const { id } = params

const data = await loadArticle(id)
return (
Expand Down
6 changes: 2 additions & 4 deletions app/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import getQueryClient from "@/lib/getQueryClient"
import { prefetchSearchFacets, prefetchSearchResult } from "./fetchSearchResult.server"

const Page = async (props: { searchParams: Promise<{ q: string }> }) => {
const searchParams = await props.searchParams;
const searchParams = await props.searchParams

const {
q
} = searchParams;
const { q } = searchParams

const queryClient = getQueryClient()
await prefetchSearchResult(q, queryClient)
Expand Down

0 comments on commit 6c4d75e

Please sign in to comment.