catstodon/app/javascript/flavours/glitch/utils/filters.ts
fusagiko / takayamaki e8243d5bbd [Glitch] Add type annotation for some js files
Port e38b391940 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-05-08 22:15:00 +02:00

17 lines
352 B
TypeScript

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