Passed down currentUserId to accounts page

This commit is contained in:
ToanDo
2020-12-12 15:17:51 -05:00
parent 4dbed9922b
commit 2aeaaab3bc

View File

@@ -66,7 +66,7 @@ const DELETE_USER = gql`
`;
const Accounts = () => {
const { customerId } = useContext(UserContext);
const { customerId, id: currentUserId } = useContext(UserContext);
const { data, loading, error, refetch, fetchMore } = useQuery(GET_ALL_USERS, {
variables: { customerId },
@@ -173,6 +173,7 @@ const Accounts = () => {
return (
<AccountsPage
data={data.getAllUsers.items}
currentUserId={currentUserId}
onLoadMore={handleLoadMore}
onCreateUser={handleCreateUser}
onEditUser={handleEditUser}