Skip to content

Commit

Permalink
fix: reset error after a successful getting data
Browse files Browse the repository at this point in the history
  • Loading branch information
andrepolischuk committed Mar 19, 2024
1 parent bc8b8ab commit 56be3a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export const Routes: React.FC<RoutesProps> = ({
window.scrollTo(0, 0)
}

setError(null)
setRouteData((previousData) => ({...previousData, ...data}))
setCurrentLocation(location)
onChangeMetaData?.(meta)
Expand Down

0 comments on commit 56be3a1

Please sign in to comment.