Fix according to PR
This commit is contained in:
@ -14,8 +14,8 @@ const StyledPeopleContainer = styled.div`
|
||||
`;
|
||||
|
||||
export const GET_PEOPLE = gql`
|
||||
query GetPeople($orderBy: [persons_order_by!]) {
|
||||
persons(order_by: $orderBy) {
|
||||
query GetPeople($orderBy: [people_order_by!]) {
|
||||
people(order_by: $orderBy) {
|
||||
id
|
||||
phone
|
||||
email
|
||||
@ -57,7 +57,7 @@ function People() {
|
||||
setOrderBy(sorts.length ? reduceSortsToOrderBy(sorts) : defaultOrderBy);
|
||||
};
|
||||
|
||||
const { data } = useQuery<{ persons: GraphqlPerson[] }>(GET_PEOPLE, {
|
||||
const { data } = useQuery<{ people: GraphqlPerson[] }>(GET_PEOPLE, {
|
||||
variables: { orderBy: orderBy },
|
||||
});
|
||||
|
||||
@ -66,7 +66,7 @@ function People() {
|
||||
<StyledPeopleContainer>
|
||||
{
|
||||
<Table
|
||||
data={data ? data.persons.map(mapPerson) : []}
|
||||
data={data ? data.people.map(mapPerson) : []}
|
||||
columns={peopleColumns}
|
||||
viewName="All People"
|
||||
viewIcon={faList}
|
||||
|
||||
@ -22,7 +22,7 @@ const mocks = [
|
||||
},
|
||||
result: {
|
||||
data: {
|
||||
persons: defaultData,
|
||||
people: defaultData,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user