mastodon/app/javascript/mastodon/utils/filters.ts
2023-07-13 11:49:16 +02:00

17 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
}
}
};