Factor out common styles; fixes and improvements to post-thread-view

This commit is contained in:
Paul Frazee 2022-07-20 19:30:07 -05:00
parent c712cbbfe2
commit 39483d92db
6 changed files with 160 additions and 100 deletions

9
src/view/lib/strings.ts Normal file
View file

@ -0,0 +1,9 @@
export function pluralize(n: number, base: string, plural?: string): string {
if (n === 1) {
return base
}
if (plural) {
return plural
}
return base + 's'
}