Skip to content

Commit

Permalink
Fundamentos do Next.js - Criando rotas da aplicação
Browse files Browse the repository at this point in the history
- see notes at (#1)[#1]
  • Loading branch information
jemluz committed Nov 23, 2023
1 parent 39a4d2a commit c8d577a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/pages/product/[id].tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { useRouter } from "next/router"

export default function Product() {
const { query } = useRouter()

return (
<h1>Product {JSON.stringify(query)}</h1>
)
}
5 changes: 5 additions & 0 deletions src/pages/success.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default function Success() {
return (
<h1>success</h1>
)
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
Expand Down

0 comments on commit c8d577a

Please sign in to comment.