]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/pages/Front.js
restore page after login
[alttp.git] / resources / js / components / pages / Front.js
index 26078696bac6262901ad4629d40ca5c480161450..73b9b23d8fb6f5e6482b1f17627647d76575dc65 100644 (file)
@@ -5,6 +5,14 @@ import { useNavigate } from 'react-router-dom';
 const Front = () => {
        const navigate = useNavigate();
 
+       React.useEffect(() => {
+               const returnPath = localStorage.getItem('returnPath');
+               if (returnPath) {
+                       localStorage.removeItem('returnPath');
+                       navigate(returnPath);
+               }
+       }, []);
+
        return <Container className="mt-5">
                <Row>
                        <Col md={6}>