saleor-dashboard/src/utils/errors/staff.ts

20 lines
409 B
TypeScript
Raw Normal View History

2020-04-20 11:11:07 +00:00
import { StaffErrorFragment } from "@saleor/staff/types/StaffErrorFragment";
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;