Port 7fba458d9227bea224a6c779f895c4945005f074 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
14 lines
569 B
TypeScript
14 lines
569 B
TypeScript
import type { ApiAccountJSON } from '@/flavours/glitch/api_types/accounts';
|
|
import type { Account } from '@/flavours/glitch/models/account';
|
|
|
|
export const getCollectionPath = (id: string) => `/collections/${id}`;
|
|
|
|
export const canAccountBeAdded = (account: ApiAccountJSON | Account) =>
|
|
['automatic', 'manual'].includes(account.feature_approval.current_user);
|
|
|
|
export const canAccountBeAddedByFollowers = (
|
|
account: ApiAccountJSON | Account,
|
|
) =>
|
|
account.feature_approval.automatic.includes('followers') ||
|
|
account.feature_approval.manual.includes('followers');
|