mirror of
https://github.com/umami-software/umami.git
synced 2026-02-22 21:45:36 +01:00
feat: persist user preferences to database
This commit is contained in:
parent
7ac5913c86
commit
60ac63604f
17 changed files with 271 additions and 17 deletions
|
|
@ -3,7 +3,7 @@ import { useEffect } from 'react';
|
|||
import { useRouter } from 'next/navigation';
|
||||
import { useApi } from '@/components/hooks';
|
||||
import { setUser } from '@/store/app';
|
||||
import { removeClientAuthToken } from '@/lib/client';
|
||||
import { removeClientAuthToken, removeClientPreferences } from '@/lib/client';
|
||||
|
||||
export function LogoutPage() {
|
||||
const router = useRouter();
|
||||
|
|
@ -17,6 +17,7 @@ export function LogoutPage() {
|
|||
}
|
||||
|
||||
removeClientAuthToken();
|
||||
removeClientPreferences();
|
||||
setUser(null);
|
||||
logout();
|
||||
}, [router, post]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue