umami/hooks/useUser.js

10 lines
189 B
JavaScript
Raw Normal View History

import useStore, { setUser } from 'store/app';
const selector = state => state.user;
export default function useUser() {
const user = useStore(selector);
return { user, setUser };
}