Created
January 7, 2022 08:40
-
-
Save sand97/d1677c09bbf198273757d0269d7461cb to your computer and use it in GitHub Desktop.
Next redirection on client side
This file contains hidden or 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
//... | |
const {name} = router.query; | |
React.useEffect(() => { | |
router.replace(`/products/${name}`); | |
}) | |
//... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment