Convert 'error' usage to Toast

This commit is contained in:
Chewbacca
2022-12-20 11:34:53 -05:00
parent b7d0b4abe8
commit b348ca71b9
27 changed files with 55 additions and 97 deletions

View File

@ -3,7 +3,6 @@ import { FormattedMessage, defineMessages, useIntl } from 'react-intl';
import { useDispatch } from 'react-redux';
import { changeSettingImmediate } from 'soapbox/actions/settings';
import snackbar from 'soapbox/actions/snackbar';
import { Column, Button, Form, FormActions, FormGroup, Input, Text } from 'soapbox/components/ui';
import toast from 'soapbox/toast';
@ -30,7 +29,7 @@ const DevelopersChallenge = () => {
dispatch(changeSettingImmediate(['isDeveloper'], true));
toast.success(intl.formatMessage(messages.success));
} else {
dispatch(snackbar.error(intl.formatMessage(messages.fail)));
toast.error(intl.formatMessage(messages.fail));
}
};