summaryrefslogtreecommitdiff
path: root/src2/pages/logout.js
blob: 8ea21fab9e16d840dd5ae34a4afe02c911857df2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { useRouter } from "next/router";
import { useEffect } from "react";
import { deleteAuth } from "@/core/utils/auth";

export default function Logout() {
  const router = useRouter();

  useEffect(() => {
    deleteAuth();
    router.replace('/login');
  }, [router]);

  return null;
}