Compare commits

..

1 Commits

Author SHA1 Message Date
victorAnumudu f2e278a8cf expires login session after 5 mins 2023-01-30 11:41:49 +01:00
3 changed files with 25 additions and 14 deletions
+1 -12
View File
@@ -1,15 +1,4 @@
<svg width="174" height="31" viewBox="0 0 174 31" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0,0 173,0" stroke="url(#paint0_linear_4_1797)" stroke-width="4" stroke-linecap="round"/>
<defs>
<linearGradient id="paint0_linear_4_1797" x1="1" y1="1" x2="11.0515" y2="59.9411" gradientUnits="userSpaceOnUse">
<stop stop-color="#F539F8"/>
<stop offset="0.416763" stop-color="#C342F9"/>
<stop offset="1" stop-color="#5356FB"/>
</linearGradient>
</defs>
</svg>
<!-- <svg width="174" height="31" viewBox="0 0 174 31" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 17.9998C10.5 7.5 56.6856 24.9909 78 28C120.5 34 162 24 173 1" stroke="url(#paint0_linear_4_1797)" stroke-width="2" stroke-linecap="round"/>
<defs>
<linearGradient id="paint0_linear_4_1797" x1="1" y1="1" x2="11.0515" y2="59.9411" gradientUnits="userSpaceOnUse">
@@ -18,4 +7,4 @@
<stop offset="1" stop-color="#5356FB"/>
</linearGradient>
</defs>
</svg> -->
</svg>

Before

Width:  |  Height:  |  Size: 997 B

After

Width:  |  Height:  |  Size: 520 B

+1 -1
View File
@@ -21,7 +21,7 @@ export default function Layout({ children }) {
const navigate = useNavigate();
const logOut = () => {
localStorage.removeItem("email");
localStorage.clear();
localStorage.removeItem('session_token');
toast.success("Come Back Soon", {
icon: `🙂`,
});
+23 -1
View File
@@ -1,7 +1,29 @@
import React from "react";
import React, {useEffect} from "react";
import Home from "../components/Home";
import { useNavigate } from "react-router-dom";
import { useDispatch, useSelector } from "react-redux";
import { toast } from "react-toastify";
export default function HomePages() {
const { drawer } = useSelector((state) => state.drawer);
const dispatch = useDispatch();
const navigate = useNavigate();
const logOut = () => {
localStorage.removeItem("email");
localStorage.removeItem('session_token');
toast.success("Come Back Soon", {
icon: `🙂`,
});
navigate("/login", { replace: true });
};
useEffect(()=>{
setTimeout(()=>{
logOut()
}, 300000) //expires user login session after 5 minutes
},[])
return (
<>
<Home />