mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
14 lines
331 B
JavaScript
14 lines
331 B
JavaScript
import { useEffect } from 'react';
|
|
import { useRouter } from 'next/router';
|
|
import { get } from 'lib/web';
|
|
|
|
export default function LogoutPage() {
|
|
const router = useRouter();
|
|
const { basePath } = router;
|
|
|
|
useEffect(() => {
|
|
get(`${basePath}/api/auth/logout`).then(() => router.push('/login'));
|
|
}, []);
|
|
|
|
return null;
|
|
}
|