Skip to content

Commit

Permalink
Merge pull request #3478 from LiteFarmOrg/LF-4413-the-white-screen-is…
Browse files Browse the repository at this point in the history
…-displayed-once-the-user-tries-to-complete-the-creation-of-the-new-animal-type

LF-4413 The white screen is displayed once the user tries to complete the creation of the new animal type
  • Loading branch information
Duncan-Brain authored Sep 26, 2024
2 parents 32aa90e + b50bc4c commit 34bd752
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/webapp/src/containers/Animals/AddAnimals/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export const formatDBAnimalsToSummary = (data: Animal[], config: Config): Animal
type: typeString,
breed: breedString,
sexDetails: {},
iconKey: typeString.toUpperCase(),
iconKey: typeString?.toUpperCase(),
count: 0,
};
}
Expand Down
4 changes: 2 additions & 2 deletions packages/webapp/src/store/api/apiSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ export const api = createApi({
method: 'POST',
body,
}),
invalidatesTags: ['Animals'],
invalidatesTags: ['Animals', 'CustomAnimalTypes', 'CustomAnimalBreeds'],
}),
addAnimalBatches: build.mutation<AnimalBatch[], Partial<AnimalBatch>[]>({
query: (body) => ({
url: `${animalBatchesUrl}`,
method: 'POST',
body,
}),
invalidatesTags: ['AnimalBatches'],
invalidatesTags: ['AnimalBatches', 'CustomAnimalTypes', 'CustomAnimalBreeds'],
}),
getSoilAmendmentMethods: build.query<SoilAmendmentMethod[], void>({
query: () => `${soilAmendmentMethodsUrl}`,
Expand Down

0 comments on commit 34bd752

Please sign in to comment.