Unverified Commit c9aa9926 authored by Hyungji's avatar Hyungji Committed by GitHub

docs: incorrect `params.id` (#73045)

parent 58b993c2
......@@ -54,9 +54,9 @@ export default async function Page({
params: Promise<{ id: string }>
}) {
const id = (await params).id
const post: Post = await fetch(
`https://api.vercel.app/blog/${params.id}`
).then((res) => res.json())
const post: Post = await fetch(`https://api.vercel.app/blog/${id}`).then(
(res) => res.json()
)
return (
<main>
<h1>{post.title}</h1>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment