mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
Merge pull request #242 from simoleo89/fix/modtools-bugs
fix(mod-tools): default-sanction topic id & alert typos
This commit is contained in:
@@ -75,14 +75,16 @@ export const ModToolsUserModActionView: FC<ModToolsUserModActionViewProps> = pro
|
||||
{
|
||||
if(isSendingRef.current) return;
|
||||
|
||||
if(selectedTopic === -1) return sendAlert(LocalizeText('modtools.user.modaction.error.no.topic'));
|
||||
|
||||
const category = topics[selectedTopic];
|
||||
|
||||
if(selectedTopic === -1) return sendAlert(LocalizeText('modtools.user.modaction.error.no.topic'));
|
||||
if(!category) return sendAlert(LocalizeText('modtools.user.modaction.error.no.topic'));
|
||||
|
||||
const messageOrDefault = (message.trim().length === 0) ? LocalizeText(`help.cfh.topic.${ category.id }`) : message;
|
||||
|
||||
isSendingRef.current = true;
|
||||
SendMessageComposer(new DefaultSanctionMessageComposer(user.userId, selectedTopic, messageOrDefault));
|
||||
SendMessageComposer(new DefaultSanctionMessageComposer(user.userId, category.id, messageOrDefault));
|
||||
onCloseClick();
|
||||
};
|
||||
|
||||
|
||||
@@ -183,8 +183,8 @@ const useModToolsState = () =>
|
||||
{
|
||||
const parser = event.getParser();
|
||||
|
||||
if(parser.success) simpleAlert('Moderation action was successfull', NotificationAlertType.MODERATION, null, null, 'Success');
|
||||
else simpleAlert('There was a problem applying tht moderation action', NotificationAlertType.MODERATION, null, null, 'Error');
|
||||
if(parser.success) simpleAlert('Moderation action was successful', NotificationAlertType.MODERATION, null, null, 'Success');
|
||||
else simpleAlert('There was a problem applying the moderation action', NotificationAlertType.MODERATION, null, null, 'Error');
|
||||
});
|
||||
|
||||
useMessageEvent<CfhTopicsInitEvent>(CfhTopicsInitEvent, event =>
|
||||
|
||||
Reference in New Issue
Block a user