removed double login prevention

This commit is contained in:
Alex Holliday committed 2024-08-15 11:39:45 -07:00
1 parent 53ea08fc48
commit ae46527965
7 files changed
+26 -75

No files matched your search

+4 -22
View File
@@ -78,28 +78,10 @@ function Sidebar() {
*
*/
const logout = async () => {
try {
// Make request to BE to remove JWT from user
await axiosInstance.post(
"/auth/logout",
{ email: authState.user.email },
{
headers: {
Authorization: `Bearer ${authState.authToken}`,
"Content-Type": "application/json",
},
}
);
// Clear auth state
dispatch(clearAuthState());
dispatch(clearUptimeMonitorState());
navigate("/login");
} catch (error) {
createToast({
body: error.message,
});
}
// Clear auth state
dispatch(clearAuthState());
dispatch(clearUptimeMonitorState());
navigate("/login");
};
/**