diff --git a/src/pages/BandoEdit/index.js b/src/pages/BandoEdit/index.js index bb02088..c12e801 100644 --- a/src/pages/BandoEdit/index.js +++ b/src/pages/BandoEdit/index.js @@ -1,7 +1,7 @@ import React, { useState, useEffect, useRef } from 'react'; import { __ } from '@wordpress/i18n'; import { useNavigate, useParams } from 'react-router-dom'; -import { is, isNil, isEmpty } from 'ramda'; +import { is, isNil, isEmpty, pathOr } from 'ramda'; // store import { storeSet, useStoreValue } from '../../store'; @@ -297,6 +297,15 @@ const BandoEdit = () => { } const errUnpublishCallback = (resp) => { + const message = pathOr('', ['data', 'message'], resp); + console.log('resp', resp, message()) + if (toast.current) { + toast.current.show({ + severity: 'success', + summary: message, + detail: '' + }); + } standardErrCallback(resp); }