• This project
    • Loading...
  • Sign in

엄성진 / Learn_In_Web

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • learn_in_web
  • src
  • pages
  • post
  • [id].js
  • sungjin's avatar
    Make new Frontend with NextJS, with Auth · 8fe4f474
    8fe4f474
    sungjin authored 2021-11-22 00:42:07 +0900
[id].js 340 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
import { useRouter } from "next/dist/client/router"
import { getPostbyId } from "../../api/post"


export default function Post() {
    const router = useRouter()
    const { id } = router.query
    const post = getPostbyId(id)
    return (
        <div>
            <p>{post.title}</p>
            <p>{post.body}</p>
        </div>
    )
}