mirror of
https://github.com/docmost/docmost.git
synced 2026-05-18 23:44:24 +08:00
refactor layout
* ui polishing * frontend and backend fixes
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user