Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
remix-run-bot committed Nov 9, 2022
1 parent ffc336d commit f624322
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/remix-react/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,9 @@ function isInputElement(object: any): object is HTMLInputElement {
*
* @see https://remix.run/api/remix#usebeforeunload
*/
export function useBeforeUnload(callback: (event: BeforeUnloadEvent) => any): void {
export function useBeforeUnload(
callback: (event: BeforeUnloadEvent) => any
): void {
React.useEffect(() => {
window.addEventListener("beforeunload", callback);
return () => {
Expand Down

0 comments on commit f624322

Please sign in to comment.