Skip to content

Commit

Permalink
fix: router is undefined when using onboard modal
Browse files Browse the repository at this point in the history
  • Loading branch information
usame-algan committed Jul 7, 2023
1 parent 28bffa5 commit f973159
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/tx-flow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const TxModalProvider = ({ children }: { children: ReactNode }): ReactEle
}

handleModalClose()
}, [shouldWarn, handleModalClose, router.events])
}, [shouldWarn, handleModalClose, router])

const setTxFlow = useCallback(
(txFlow: TxModalContextType['txFlow'], onClose?: () => void, shouldWarn?: boolean) => {
Expand All @@ -63,7 +63,7 @@ export const TxModalProvider = ({ children }: { children: ReactNode }): ReactEle
return () => {
router.events.off('routeChangeStart', handleShowWarning)
}
}, [txFlow, handleShowWarning, router.events])
}, [txFlow, handleShowWarning, router])

return (
<TxModalContext.Provider value={{ txFlow, setTxFlow, setFullWidth }}>
Expand Down

0 comments on commit f973159

Please sign in to comment.