nitro-react/src/api/groups/ToggleFavoriteGroup.ts

8 lines
355 B
TypeScript
Raw Normal View History

2022-03-17 00:43:15 +01:00
import { GroupFavoriteComposer, GroupUnfavoriteComposer, HabboGroupEntryData } from '@nitrots/nitro-renderer';
2022-03-17 00:05:07 +01:00
import { SendMessageComposer } from '..';
export const ToggleFavoriteGroup = (group: HabboGroupEntryData) =>
{
2022-03-17 00:43:15 +01:00
SendMessageComposer(group.favourite ? new GroupUnfavoriteComposer(group.groupId) : new GroupFavoriteComposer(group.groupId));
2022-03-17 00:05:07 +01:00
}