Skip to content

Commit

Permalink
Translate error messages in QueryErrorDisplay
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusDoe committed Jul 5, 2023
1 parent 7337cf7 commit 341a505
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { ApolloError } from '@apollo/client';
import { useTranslation } from 'react-i18next';
import { translateErrorMessage } from '../../i18n';
import { errorToTranslatedString } from '../../helpers/app-helpers';

const QueryErrorDisplay = ({ error }: { error: ApolloError }) => {
const QueryErrorDisplay = ({ error }: { error: unknown }) => {
const { t } = useTranslation();
return <div>{translateErrorMessage(error.message, t)}</div>;
return <div>{errorToTranslatedString(error, t)}</div>;
};

export default QueryErrorDisplay;

0 comments on commit 341a505

Please sign in to comment.