Skip to content

Commit

Permalink
Prevent default and stop propagation on back button click in EventForm
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunkomath committed Jan 26, 2025
1 parent 51d8074 commit 7f30595
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/form/event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,11 @@ export default function EventForm({
<CardFooter>
<div className="ml-auto flex items-center justify-end gap-x-6">
<Button
type="button"
variant="ghost"
onClick={() => {
onClick={(evt) => {
evt.preventDefault();
evt.stopPropagation();
router.back();
}}
>
Expand Down

0 comments on commit 7f30595

Please sign in to comment.