aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/app/logout/page.tsx
blob: 0df28978a7e3e055342972af8d314b43896c7ceb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"use client";

import { useEffect } from "react";
import { useRouter } from "next/navigation";
import { signOut } from "next-auth/react";

export default function Logout() {
  const router = useRouter();
  useEffect(() => {
    signOut({
      redirect: false,
      callbackUrl: "/",
    }).then((d) => {
      router.push(d.url);
    });
  }, []);
  return <span />;
}