Skip to content

Instantly share code, notes, and snippets.

@lalainarahajason
Last active November 1, 2023 20:32
Show Gist options
  • Save lalainarahajason/4e372eb8d0778e18279d68e146611553 to your computer and use it in GitHub Desktop.
Save lalainarahajason/4e372eb8d0778e18279d68e146611553 to your computer and use it in GitHub Desktop.
Page.jsx
import { useRouter } from "next/navigation";
export default function Main() {
const router = useRouter();
const nextPage = (data) => {
router.push("/events/add");
};
return (
<>
<input type="button" onClick={nextPage} />
</>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment