feat: make email and password updatable
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
b8fb84ef42
commit
bb6c464770
10
packages/web/src/hooks/useCurrentUser.ts
Normal file
10
packages/web/src/hooks/useCurrentUser.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { useQuery } from '@apollo/client';
|
||||
import { IUser } from '@automatisch/types';
|
||||
|
||||
import { GET_CURRENT_USER } from 'graphql/queries/get-current-user';
|
||||
|
||||
export default function useCurrentUser(): IUser {
|
||||
const { data } = useQuery(GET_CURRENT_USER, { fetchPolicy: 'cache-and-network' });
|
||||
|
||||
return data?.getCurrentUser;
|
||||
}
|
Reference in New Issue
Block a user