feat(web): s (#9663)

This commit is contained in:
Jason Rasmussen
2024-05-22 09:33:37 -04:00
committed by GitHub
parent ae21781442
commit f6f82a5662
10 changed files with 25 additions and 22 deletions

View File

@@ -279,4 +279,6 @@ export const handlePromiseError = <T>(promise: Promise<T>): void => {
promise.catch((error) => console.error(`[utils.ts]:handlePromiseError ${error}`, error));
};
export const memoryLaneTitle = (yearsAgo: number) => `${yearsAgo} ${yearsAgo ? 'years' : 'year'} ago`;
export const s = (count: number) => (count === 1 ? '' : 's');
export const memoryLaneTitle = (yearsAgo: number) => `year${s(yearsAgo)} ago`;