mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-01-31 10:22:36 +01:00
Merge branch 'dev' of https://git.krews.org/nitro/nitro-react into dev
This commit is contained in:
commit
8379f8613e
@ -58,8 +58,12 @@ export const ModToolsUserModActionView: FC<ModToolsUserModActionViewProps> = pro
|
|||||||
|
|
||||||
const sendDefaultSanction = () =>
|
const sendDefaultSanction = () =>
|
||||||
{
|
{
|
||||||
SendMessageComposer(new DefaultSanctionMessageComposer(user.userId, selectedTopic, message));
|
let errorMessage: string = null;
|
||||||
|
const category = topics[selectedTopic];
|
||||||
|
if(selectedTopic === -1) errorMessage = 'You must select a CFH topic';
|
||||||
|
if(errorMessage) return sendAlert(errorMessage);
|
||||||
|
const messageOrDefault = (message.trim().length === 0) ? LocalizeText(`help.cfh.topic.${category.id}`) : message;
|
||||||
|
SendMessageComposer(new DefaultSanctionMessageComposer(user.userId, selectedTopic, messageOrDefault));
|
||||||
onCloseClick();
|
onCloseClick();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +81,7 @@ export const ModToolsUserModActionView: FC<ModToolsUserModActionViewProps> = pro
|
|||||||
|
|
||||||
if(errorMessage)
|
if(errorMessage)
|
||||||
{
|
{
|
||||||
sendAlert('You must select a sanction');
|
sendAlert(errorMessage);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user