mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 07:37:11 +01:00
Replaced redux with zustand. Fixed login issue, closes #980.
This commit is contained in:
parent
7071f5fba5
commit
9937caa569
33 changed files with 234 additions and 286 deletions
9
hooks/useUser.js
Normal file
9
hooks/useUser.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import useStore, { setUser } from 'store/app';
|
||||
|
||||
const selector = state => state.user;
|
||||
|
||||
export default function useUser() {
|
||||
const user = useStore(selector);
|
||||
|
||||
return { user, setUser };
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue