openmrs / openmrs-esm-form-builder

OpenMRS Form Builder microfrontend
Other
5 stars 57 forks source link

Refactor 'formHasResources' condition in the 'useClobdata' block #240

Open malak-elbanna opened 3 months ago

malak-elbanna commented 3 months ago

Summary

1- Refactored the 'formHasResources' condition to improve readibility and maintainablity. 2- Used TypeScript's optimal chaining and nullish coalescing operator to streamline the condition.

Related Issue

https://github.com/openmrs/openmrs-esm-form-builder/issues/239