Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirecting to different pages #95

Open
SxMAbel opened this issue May 24, 2023 · 2 comments
Open

Redirecting to different pages #95

SxMAbel opened this issue May 24, 2023 · 2 comments

Comments

@SxMAbel
Copy link

SxMAbel commented May 24, 2023

Using your code, I want to know how to redirect,

Ex: user types in data and click a button, after clicking the button it verifies that the data, next if verification complete it will send them to a different page.

I've tried:

import { useRouter } from 'next/navigation'
import { redirect } from 'next/navigation'

@rohan9607
Copy link

"use client"
import { useRouter } from 'next/navigation'

const handleClick = (e : any) => {
const {name, value} = e.target;
...Verify Data

if(verified){
router.push("/destination")
}

@MrBlackGhostt
Copy link

if it not solve i want to work on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants