Seperated global and followed activity feed

This commit is contained in:
2018-11-12 14:24:00 +09:00
parent 76990417e4
commit f711cdb011
12 changed files with 114 additions and 20 deletions

View File

@ -1,3 +1,15 @@
const specialized = {
"new activity": "new activities"
}
export function plural(count: number, singular: string): string {
return (count === 1 || count === -1) ? (count + " " + singular) : (count + " " + singular + "s")
if(count === 1 || count === -1) {
return count + " " + singular
}
if(specialized[singular]) {
return count + " " + specialized[singular]
}
return count + " " + singular + "s"
}