Skip to content

Commit

Permalink
added the api
Browse files Browse the repository at this point in the history
  • Loading branch information
akanshaaa19 committed Sep 9, 2024
1 parent d9dd531 commit bbbeaf6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/containers/Chat/ChatMessages/StatusBar/StatusBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useQuery } from '@apollo/client';
import { getUserSession } from 'services/AuthService';
import { BSPBALANCE, GET_ORGANIZATION_STATUS } from 'graphql/queries/Organization';
import styles from './StatusBar.module.css';
import { GET_WA_MANAGED_PHONES, GET_WA_MANAGED_PHONES_STATUS } from 'graphql/queries/WaGroups';

const StatusBar = () => {
const variables = { organizationId: getUserSession('organizationId') };
Expand All @@ -15,6 +16,9 @@ const StatusBar = () => {
fetchPolicy: 'cache-only',
});

const { data } = useQuery(GET_WA_MANAGED_PHONES_STATUS);
console.log(data);

if (!balanceData && !orgStatus) {
return null;
}
Expand Down
9 changes: 9 additions & 0 deletions src/graphql/queries/WaGroups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,12 @@ export const GET_WA_GROUP = gql`
}
}
`;

export const GET_WA_MANAGED_PHONES_STATUS = gql`
query WaManagedPhones {
waManagedPhones {
status
phone
}
}
`;

0 comments on commit bbbeaf6

Please sign in to comment.