amati/src/app/(auth)/logout/page.tsx
2024-02-28 10:05:11 +07:00

19 lines
430 B
TypeScript

"use client";
import logoutAction from "@/modules/auth/actions/logoutAction";
import { useEffect } from "react";
/**
* LogoutPage component handles the logout process.
* It checks if a user is logged in, logs them out, and redirects to the login page.
*/
export default function LogoutPage() {
useEffect(() => {
(async () => await logoutAction())()
.then(() => {})
.catch(() => {});
}, []);
return <div></div>;
}