mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-18 23:33:37 +01:00
14 lines
302 B
JavaScript
14 lines
302 B
JavaScript
import { useEffect } from 'react';
|
|
import { useRouter } from 'next/router';
|
|
|
|
export default function LogoutPage() {
|
|
const router = useRouter();
|
|
const { basePath } = router;
|
|
|
|
useEffect(() => {
|
|
fetch(`${basePath}/api/auth/logout`).then(() => router.push('/login'));
|
|
}, []);
|
|
|
|
return null;
|
|
}
|