mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 23:57:12 +01:00
Support basePath in all queries.
This commit is contained in:
parent
2508198a51
commit
5068ab12a9
11 changed files with 57 additions and 29 deletions
|
|
@ -1,8 +1,12 @@
|
|||
import { useEffect } from 'react';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
export default function LogoutPage() {
|
||||
const router = useRouter();
|
||||
const { basePath } = router;
|
||||
|
||||
useEffect(() => {
|
||||
fetch('/api/auth/logout').then(() => (window.location.href = '/login'));
|
||||
fetch(`${basePath}/api/auth/logout`).then(() => router.push('/login'));
|
||||
}, []);
|
||||
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue