Skip to content

Commit

Permalink
refactor: replace short hand type conversions with function calls
Browse files Browse the repository at this point in the history
Prefer using explicit casts by calling `Number`, `Boolean`, or `String` over using operators like `+`, `!!` or `"" +`. This is considered best practice as it improves readability.
  • Loading branch information
deepsource-autofix[bot] authored Dec 18, 2023
1 parent 6a87984 commit df76dd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/components/Info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const Info: ParentComponent<{
}> = (props) => {
return (
<div
classList={{ "flex gap-1.5 text-info text-xs items-center": true, "cursor-pointer": !!props.onClick }}
classList={{ "flex gap-1.5 text-info text-xs items-center": true, "cursor-pointer": Boolean(props.onClick) }}
onClick={props.onClick}
>
<FiInfo />
Expand Down

0 comments on commit df76dd4

Please sign in to comment.