Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
futurepaul committed Dec 16, 2022
1 parent 88d2e5e commit 1888ce9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/components/Close.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ export default function Close({ onClose, to }: Props) {
if (onClose) {
onClose();
}

// onClose could be a cleanup function
// So we still might want to navigate after
if (to) {
navigate(to);
} else {
navigate("/");
}

}
return (
<div className="h-10 w-10 min-w-10 text-white active:text-half-faint" onClick={handleClose}>
Expand Down

0 comments on commit 1888ce9

Please sign in to comment.