Open
Description
DESCRIPTION -
Refactor the code to create a reusable function for capitalizing the first letter and making the rest lowercase.
As discussed in the code review for #866 the capitalization logic for project level and type is currently implemented inline within the ProjectDetailsPage
component. To improve code reusability, testability, and maintainability, this issue proposes extracting this logic into a separate utility function.
Current Implementation
The current code for capitalization is as follows:
project.level[0].toUpperCase() + project.level.slice(1).toLowerCase()
Proposed Changes
1. Create a new function in a utility file that performs the capitalization.
2. Replace the existing inline capitalization code in ProjectDetailsPage.js
for project.level
and project.type
with calls to the new function.
Metadata
Assignees
Type
Projects
Status
In progress
Activity