Skip to content

Commit

Permalink
Merge pull request #299 from RootstockCollective/dao-799
Browse files Browse the repository at this point in the history
DAO-799 show error of Unsupported Network
  • Loading branch information
jessgusclark authored Oct 29, 2024
2 parents 8d3f31f + be1448e commit 96bbf7a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/MainContainer/MainContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ export const MainContainer: FC<Props> = ({ children, notProtected = false }) =>
}

useEffect(() => {
// Clear message on route change
setMessage(null)
}, [pathname, setMessage])
// Clear message on route change unless it is Unsupported network
if (message && message.title !== 'Unsupported network') {
setMessage(null)
}
}, [pathname, message, setMessage])

useEffect(() => {
// This is to prevent Hydration error on client side
Expand Down

0 comments on commit 96bbf7a

Please sign in to comment.