diondiondion ac0bacbcc0 [Glitch] Remove frontend check for collections feature flag
Port 7fba458d9227bea224a6c779f895c4945005f074 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2026-05-30 12:19:47 +02:00

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');