Refactor src/categories/create.js to reduce cognitive complexity
File: src/categories/create.js
SonarCloud Warning: The cognitive complexity of this function is 17, but the allowed limit is 15.
Objective:
Refactor the code in src/categories/create.js to bring the cognitive complexity down from 17 to 15.
Ensure no new issues or warnings are introduced during the refactor.
Additional Information:
This refactor addresses a SonarCloud warning in the Adaptability category. I will update the issue once the refactor is complete.
Refactor src/categories/create.js to reduce cognitive complexity
File:
src/categories/create.js
SonarCloud Warning: The cognitive complexity of this function is 17, but the allowed limit is 15.
Objective:
src/categories/create.js
to bring the cognitive complexity down from 17 to 15.Additional Information: This refactor addresses a SonarCloud warning in the Adaptability category. I will update the issue once the refactor is complete.