Skip to content

Commit

Permalink
feat: Include measurement units in API fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
David Code Howard committed Oct 31, 2023
1 parent c884c35 commit babc75d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/project/projectFragments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const projectData = /* GraphQL */ `
description
updatedAt
archived
measurementUnits
membershipList {
...projectMembershipList
}
Expand Down
2 changes: 2 additions & 0 deletions src/project/projectSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
updateUsers,
} from 'terraso-client-shared/account/accountSlice';
import {
MeasurementUnits,
ProjectAddUserMutationInput,
UserRole,
} from 'terraso-client-shared/graphqlSchema/graphql';
Expand All @@ -48,6 +49,7 @@ export type Project = {
memberships: Record<string, ProjectMembership>;
sites: SerializableSet;
archived: boolean;
measurementUnits: MeasurementUnits;
};

interface MembershipKey {
Expand Down
1 change: 1 addition & 0 deletions src/selectors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const generateProject = (
sites: siteSet,
archived: false,
memberships: keyBy(memberships, 'id'),
measurementUnits: 'METRIC',
};
};

Expand Down

0 comments on commit babc75d

Please sign in to comment.