refactored Authentication
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useAuth } from 'hooks/useAuth';
|
||||
|
||||
export const SignoutScreen = () => {
|
||||
const { signout } = useAuth();
|
||||
|
||||
useEffect(() => {
|
||||
const logout = async () => {
|
||||
await signout();
|
||||
window.location.href = '/';
|
||||
};
|
||||
logout();
|
||||
}, []);
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user