Skip to content

Commit

Permalink
test: update test page to use dynamic APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
lubieowoce committed Sep 27, 2024
1 parent dde2719 commit 0dd489e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ export async function generateStaticParams() {
return []
}

export default function Page({ params }) {
export default async function Page({ params }) {
const { key } = await params
const data = {
key: params.key,
key,
timestamp: Date.now(),
}
console.log('/timestamp/key/[key] rendered', data)

let path = null
try {
const decoded = decodeURIComponent(params.key)
const decoded = decodeURIComponent(key)
new URL(decoded, 'http://__n')
path = decoded
} catch (err) {}
Expand Down

0 comments on commit 0dd489e

Please sign in to comment.