Add liked-by and reposted-by views
This commit is contained in:
parent
0ec0ba996f
commit
ce83648f9d
12 changed files with 704 additions and 12 deletions
|
@ -1,3 +1,5 @@
|
|||
import {AdxUri} from '@adxp/mock-api'
|
||||
|
||||
export function pluralize(n: number, base: string, plural?: string): string {
|
||||
if (n === 1) {
|
||||
return base
|
||||
|
@ -7,3 +9,15 @@ export function pluralize(n: number, base: string, plural?: string): string {
|
|||
}
|
||||
return base + 's'
|
||||
}
|
||||
|
||||
export function makeRecordUri(
|
||||
didOrName: string,
|
||||
collection: string,
|
||||
recordKey: string,
|
||||
) {
|
||||
const urip = new AdxUri(`adx://host/`)
|
||||
urip.host = didOrName
|
||||
urip.collection = collection
|
||||
urip.recordKey = recordKey
|
||||
return urip.toString()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue