1 line
1.3 KiB
JSON
1 line
1.3 KiB
JSON
{"ast":null,"code":"import { useEffect } from 'react';\nimport { useLocation, withRouter } from 'react-router-dom';\n\nvar ScrollToTop = function ScrollToTop(props) {\n var location = useLocation();\n useEffect(function () {\n window.scrollTo(0, 0);\n }, [location]);\n return props.children;\n};\n\nexport default withRouter(ScrollToTop);","map":{"version":3,"names":["useEffect","useLocation","withRouter","ScrollToTop","props","location","window","scrollTo","children"],"sources":["/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/src/ScrollToTop.js"],"sourcesContent":["import { useEffect } from 'react';\nimport { useLocation, withRouter } from 'react-router-dom';\n\nconst ScrollToTop = (props) => {\n\n let location = useLocation();\n\n useEffect(() => {\n window.scrollTo(0, 0)\n }, [location]);\n\n return props.children;\n}\n\nexport default withRouter(ScrollToTop);\n"],"mappings":"AAAA,SAASA,SAAT,QAA0B,OAA1B;AACA,SAASC,WAAT,EAAsBC,UAAtB,QAAwC,kBAAxC;;AAEA,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAAW;EAE3B,IAAIC,QAAQ,GAAGJ,WAAW,EAA1B;EAEAD,SAAS,CAAC,YAAM;IACZM,MAAM,CAACC,QAAP,CAAgB,CAAhB,EAAmB,CAAnB;EACH,CAFQ,EAEN,CAACF,QAAD,CAFM,CAAT;EAIA,OAAOD,KAAK,CAACI,QAAb;AACH,CATD;;AAWA,eAAeN,UAAU,CAACC,WAAD,CAAzB"},"metadata":{},"sourceType":"module"} |