MCPcopy Create free account
hub / github.com/dailydotdev/apps / formatReadTime

Function formatReadTime

packages/shared/src/components/utilities/common.tsx:284–290  ·  view source on GitHub ↗
(minutes: number)

Source from the content-addressed store, hash-verified

282}
283
284export const formatReadTime = (minutes: number): string => {
285 const hours = Math.floor(minutes / 60);
286 const remainingMinutes = minutes % 60;
287 return hours > 0
288 ? `${hours.toString()}h ${remainingMinutes.toString()}m`
289 : `${remainingMinutes.toString()}m`;
290};
291
292export const lazyCommentThreshold = 5;
293

Callers 5

common.spec.tsxFile · 0.90
PostMetadataFunction · 0.90
PostReadTimeFunction · 0.90
ReadingListRowFunction · 0.90
PickRowFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected