Skip to content

Commit

Permalink
Added scroll to animal details page
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsc7git committed Aug 2, 2024
1 parent 172025f commit cf4f7b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/AnimalDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ const AnimalDetails = () => {
sharedState[1](primaryImageIndex)
}
}

window.scrollTo(0, 0);

// eslint-disable-next-line react-hooks/exhaustive-deps
}, [sharedState[1], pet])

Expand Down

0 comments on commit cf4f7b1

Please sign in to comment.