mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Refactored useApi usage.
This commit is contained in:
parent
561cde6e7e
commit
cad0b73e42
26 changed files with 67 additions and 85 deletions
|
|
@ -1,8 +1,8 @@
|
|||
import { useEffect } from 'react';
|
||||
import { useRouter } from 'next/router';
|
||||
import { removeItem, useApi } from 'next-basics';
|
||||
import { AUTH_TOKEN } from 'lib/constants';
|
||||
import useApi from 'hooks/useApi';
|
||||
import { setUser } from 'store/app';
|
||||
import { removeClientAuthToken } from 'lib/client';
|
||||
|
||||
export default function LogoutPage() {
|
||||
const router = useRouter();
|
||||
|
|
@ -13,7 +13,7 @@ export default function LogoutPage() {
|
|||
await post('/logout');
|
||||
}
|
||||
|
||||
removeItem(AUTH_TOKEN);
|
||||
removeClientAuthToken();
|
||||
|
||||
logout();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue