fix missing toast message

This commit is contained in:
Mary Hipp 2023-10-02 13:48:28 -04:00 committed by psychedelicious
parent 1aba369c83
commit 208bf68ba2

View File

@ -16,11 +16,6 @@ import { boardsApi } from 'services/api/endpoints/boards';
import { startAppListening } from '..';
import { imagesApi } from '../../../../../services/api/endpoints/images';
const DEFAULT_UPLOADED_TOAST: UseToastOptions = {
title: t('toast.imageUploaded'),
status: 'success',
};
export const addImageUploadedFulfilledListener = () => {
startAppListening({
matcher: imagesApi.endpoints.uploadImage.matchFulfilled,
@ -43,6 +38,11 @@ export const addImageUploadedFulfilledListener = () => {
return;
}
const DEFAULT_UPLOADED_TOAST: UseToastOptions = {
title: t('toast.imageUploaded'),
status: 'success',
};
// default action - just upload and alert user
if (postUploadAction?.type === 'TOAST') {
const { toastOptions } = postUploadAction;