glitch-soc/app/javascript/flavours/glitch/utils/filters.ts
Renaud Chaput 18f55567b0 [Glitch] Upgrade to typescript-eslint v6
Port a7253075d1 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-07-13 14:51:24 +02:00

16 lines
372 B
TypeScript

export const toServerSideType = (columnType: string) => {
switch (columnType) {
case 'home':
case 'notifications':
case 'public':
case 'thread':
case 'account':
return columnType;
default:
if (columnType.includes('list:')) {
return 'home';
} else {
return 'public'; // community, account, hashtag
}
}
};