saleor-dashboard/src/utils/errors/staff.ts
2020-07-07 12:14:12 +02:00

19 lines
413 B
TypeScript

import { StaffErrorFragment } from "@saleor/fragments/types/StaffErrorFragment";
import { IntlShape } from "react-intl";
import getAccountErrorMessage from "./account";
function getStaffErrorMessage(
err: StaffErrorFragment,
intl: IntlShape
): string {
return getAccountErrorMessage(
err && {
...err,
__typename: "AccountError"
},
intl
);
}
export default getStaffErrorMessage;