mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-16 02:05:04 +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;
|
|
}
|