Created
February 22, 2023 09:24
-
-
Save shameemreza/44c034b365718b74a35fe1d25cb0e5cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useRouter } from "next/router"; | |
function UserProfile() { | |
const router = useRouter(); | |
const { id } = router.query; | |
// Fetch data for user with id | |
... | |
return ( | |
<div> | |
<h1>{user.name}</h1> | |
<p>{user.bio}</p> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment