Motion Framer On click

  framer-motion, javascript, reactjs

I have code –>

I know this looks terrible but its just for show my problem. Im using Framer Motion for page transitions. The beginning of the animation looks like I want. The subpage exits from the bottom to the full screen. There is a "back" button on the subpage. How to make the subpage scroll down after clicking this button? It’s just about undoing the animation, because the current page just disappears. I tried to find the answer and mess with onClick, but it didn’t work out: /

Thanks in advance for your comments!

Source: Ask Javascript Questions