2020-07-07 10:14:12 +00:00
|
|
|
import { StaffErrorFragment } from "@saleor/fragments/types/StaffErrorFragment";
|
2020-05-14 09:30:32 +00:00
|
|
|
import { IntlShape } from "react-intl";
|
|
|
|
|
2020-04-20 11:11:07 +00:00
|
|
|
import getAccountErrorMessage from "./account";
|
|
|
|
|
|
|
|
function getStaffErrorMessage(
|
|
|
|
err: StaffErrorFragment,
|
|
|
|
intl: IntlShape
|
|
|
|
): string {
|
|
|
|
return getAccountErrorMessage(
|
|
|
|
err && {
|
|
|
|
...err,
|
|
|
|
__typename: "AccountError"
|
|
|
|
},
|
|
|
|
intl
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default getStaffErrorMessage;
|