Skip to content

Commit

Permalink
Merge pull request #20 from rambler-digital-solutions/reset-error
Browse files Browse the repository at this point in the history
fix: reset error after a successful getting data
  • Loading branch information
andrepolischuk authored Mar 19, 2024
2 parents bc8b8ab + 56be3a1 commit 0fe409e
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 0fe409e

Please sign in to comment.