mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 22:53:08 +08:00
06d854a7d2
* ui polishing * frontend and backend fixes
16 lines
368 B
TypeScript
16 lines
368 B
TypeScript
export function formatMemberCount(memberCount: number): string {
|
|
if (memberCount === 1) {
|
|
return "1 member";
|
|
} else {
|
|
return `${memberCount} members`;
|
|
}
|
|
}
|
|
|
|
export function extractPageSlugId(input: string): string {
|
|
if (!input) {
|
|
return undefined;
|
|
}
|
|
const parts = input.split("-");
|
|
return parts.length > 1 ? parts[parts.length - 1] : input;
|
|
}
|