Skip to content

Commit

Permalink
export user and request from useUser hook
Browse files Browse the repository at this point in the history
  • Loading branch information
SamiCharfeddine committed Jan 26, 2021
1 parent 2748056 commit b438e4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hooks/useUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import useRequest from 'wappsto-blanket/hooks/useRequest';
import { getUserData } from 'wappsto-redux/selectors/entities';

const useUser = () => {
const user = useSelector((state) => getUserData(state));
const user = useSelector(getUserData);
const { request, send } = useRequest();

useEffect(() => {
Expand Down Expand Up @@ -43,7 +43,7 @@ const useUser = () => {
const icon = user?.provider?.[0]?.picture;
const status = request?.status || 'pending';

return { status, icon, name };
return { status, icon, name, user, request };
}

export default useUser;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wappsto-blanket",
"version": "1.2.0",
"version": "1.2.1",
"description": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down

0 comments on commit b438e4f

Please sign in to comment.