Skip to content

Commit

Permalink
Capitalize first letter of task description
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddasol committed Dec 10, 2024
1 parent 5b387f2 commit 0204d48
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,12 @@ const TagIdDisplay = ({ task }: { task: Task }) => {
}

const DescriptionDisplay = ({ task }: { task: Task }) => {
const capitalizeFirstLetter = (str: string) => {
return str.charAt(0).toUpperCase() + str.slice(1)
}

if (!task.description) return <Typography key={task.id + 'descr'}>{'N/A'}</Typography>
return <Typography key={task.id + 'descr'}>{task.description}</Typography>
return <Typography key={task.id + 'descr'}>{capitalizeFirstLetter(task.description)}</Typography>
}

const InspectionTypesDisplay = ({ task }: { task: Task }) => {
Expand Down

0 comments on commit 0204d48

Please sign in to comment.