Skip to content

Commit

Permalink
Pulling correct useContactQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-bizz committed Aug 30, 2024
1 parent 660f33e commit ec2ddb2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/components/Tool/Appeal/AppealsContext/contacts.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ fragment AppealContactInfo on Contact {
pledgeFrequency
pledgeReceived
pledgeStartDate
starred
status
pledges {
id
amount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
} from '@mui/material';
import { useDrop } from 'react-dnd';
import { useTranslation } from 'react-i18next';
import { useContactsQuery } from 'pages/accountLists/[accountListId]/contacts/Contacts.generated';
import {
CardContentInner,
ColumnTitle,
Expand All @@ -28,6 +27,7 @@ import {
AppealsType,
} from 'src/components/Tool/Appeal/AppealsContext/AppealsContext';
import { appealHeaderInfoHeight } from '../../AppealDetails/AppealHeaderInfo/AppealHeaderInfo';
import { useContactsQuery } from '../../AppealsContext/contacts.generated';
import { ContactFlowDropZone } from '../ContactFlowDropZone/ContactFlowDropZone';
import { ContactFlowRow } from '../ContactFlowRow/ContactFlowRow';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ import {
AppealsContext,
AppealsType,
} from '../../AppealsContext/AppealsContext';
import { AppealContactInfoFragment } from '../../AppealsContext/contacts.generated';

// When making changes in this file, also check to see if you don't need to make changes to the below file
// src/components/Contacts/ContactFlow/ContactFlowRow/ContactFlowRow.tsx

interface Props extends Omit<ContactFlowRowProps, 'status'> {
interface Props extends Omit<ContactFlowRowProps, 'status' | 'contact'> {
contact: AppealContactInfoFragment;
contactStatus?: StatusEnum | null;
appealStatus: AppealStatusEnum;
}
Expand Down
4 changes: 3 additions & 1 deletion src/components/Tool/Appeal/List/ContactRow/ContactRowMock.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PledgeFrequencyEnum } from 'src/graphql/types.generated';
import { PledgeFrequencyEnum, StatusEnum } from 'src/graphql/types.generated';
import { AppealContactInfoFragment } from '../../AppealsContext/contacts.generated';

export const defaultContact: AppealContactInfoFragment = {
Expand All @@ -8,6 +8,8 @@ export const defaultContact: AppealContactInfoFragment = {
pledgeCurrency: 'CAD',
pledgeFrequency: PledgeFrequencyEnum.Monthly,
pledgeReceived: true,
status: StatusEnum.AskInFuture,
starred: false,
pledges: [
{
id: 'pledge-1',
Expand Down

0 comments on commit ec2ddb2

Please sign in to comment.