fix(striker-ui): rename message id in manage manifest

main
Tsu-ba-me 2 years ago
parent bdbba0d59d
commit c4704aa298
  1. 6
      striker-ui/components/ManageManifest/ManageManifestPanel.tsx

@ -45,7 +45,7 @@ import useFormUtils from '../../hooks/useFormUtils';
import useIsFirstRender from '../../hooks/useIsFirstRender'; import useIsFirstRender from '../../hooks/useIsFirstRender';
import useProtectedState from '../../hooks/useProtectedState'; import useProtectedState from '../../hooks/useProtectedState';
const MSG_ID_API = 'api'; const MSG_ID_MANIFEST_API = 'api';
const getFormData = ( const getFormData = (
...[{ target }]: DivFormEventHandlerParameters ...[{ target }]: DivFormEventHandlerParameters
@ -237,7 +237,7 @@ const ManageManifestPanel: FC = () => {
api[method](url, body) api[method](url, body)
.then(() => { .then(() => {
setMessage(MSG_ID_API, { setMessage(MSG_ID_MANIFEST_API, {
children: successMsg, children: successMsg,
}); });
}) })
@ -245,7 +245,7 @@ const ManageManifestPanel: FC = () => {
const emsg = handleAPIError(apiError); const emsg = handleAPIError(apiError);
emsg.children = getErrorMsg(emsg.children); emsg.children = getErrorMsg(emsg.children);
setMessage(MSG_ID_API, emsg); setMessage(MSG_ID_MANIFEST_API, emsg);
}) })
.finally(() => { .finally(() => {
setIsSubmittingForm(false); setIsSubmittingForm(false);

Loading…
Cancel
Save