umami/hooks/useUser.js

12 lines
206 B
JavaScript
Raw Normal View History

import useStore, { setUser } from 'store/app';
const selector = state => state.user;
2023-05-18 08:20:06 +02:00
export function useUser() {
const user = useStore(selector);
return { user, setUser };
}
2023-05-18 08:20:06 +02:00
export default useUser;