import { useGlobalStore } from 'store' ; import bindActions from 'store/bindActions' ; import loginReducer from 'store/login' ; const { actions } = loginReducer ; /**
 * useLogin Custom Hook
 */ const useLogin = ( ) => { const { state , dispatch } = useGlobalStore ( ) ; const { login } = state ; const { handleLogin , handleLogout } = actions ; const loginActions = bindActions ( { handleLogin , handleLogout } , dispatch ) ; return { ... login , ... loginActions } ; } ; export default useLogin ;