Skip to content

Commit

Permalink
replace a by 1 in time component (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugolxt authored Dec 18, 2024
1 parent ab8b7d3 commit 3c7c7f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/primitives/Time.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function Time({ timestamp, prefix }: TimeProps) {

return then
.replace(/in\s/, prefix ? `${prefix} ` : "In ")
.replace(/a\s/, "1 ")
.replace(/\bminute(s?)\b/g, "m")
.replace(/\bsecond(s?)\b/g, "s")
.replace(/\bhour(s?)\b/g, (_match, plural) => (plural ? "hours" : "hour"))
Expand Down

0 comments on commit 3c7c7f5

Please sign in to comment.