Skip to content

Commit 7dd9659

Browse files
committed
Remove line about contacting us from error message
1 parent ef70d8b commit 7dd9659

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

frontend/language/src/en.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@
243243
"general.disabled": "Disabled",
244244
"general.edit": "Edit",
245245
"general.enabled": "Enabled",
246-
"general.error_message": "An error has occurred! If the problem persists, contact us on <a href=\"https://altinn.slack.com\">Slack</a>.",
246+
"general.error_message": "An error has occurred!",
247247
"general.error_message_with_colon": "Error message:",
248248
"general.fetch_error_message": "Failed to load required data for this page. Please reload the page to try again",
249249
"general.fetch_error_title": "An error occurred while loading",

frontend/language/src/nb.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@
267267
"general.disabled": "Deaktivert",
268268
"general.edit": "Endre",
269269
"general.enabled": "Aktivert",
270-
"general.error_message": "Det har oppstått en feil! Om problemet vedvarer, ta kontakt med oss på <a href=\"https://altinn.slack.com\">Slack</a>.",
270+
"general.error_message": "Det har oppstått en feil!",
271271
"general.error_message_with_colon": "Feilmelding:",
272272
"general.fetch_error_message": "Kunne ikke laste inn nødvendig data for denne siden. Last siden på nytt for å prøve igjen.",
273273
"general.fetch_error_title": "En feil oppstod ved innlasting av",

frontend/packages/shared/src/components/ErrorBoundaryFallback.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import React from 'react';
22
import { useErrorBoundary } from 'react-error-boundary';
33
import { useTranslation } from 'react-i18next';
44
import { _useIsProdHack } from 'app-shared/utils/_useIsProdHack';
5-
import { Trans } from 'react-i18next';
6-
import { Alert, Button, ErrorMessage, Link, Paragraph } from '@digdir/design-system-react';
5+
import { Alert, Button, ErrorMessage, Paragraph } from '@digdir/design-system-react';
76
import { Center } from './Center';
87
import classes from './ErrorBoundaryFallback.module.css';
98

@@ -18,7 +17,7 @@ export const ErrorBoundaryFallback = ({ error }: ErrorBoundaryFallbackProps) =>
1817
return (
1918
<Center className={classes.container}>
2019
<Alert severity='danger' className={classes.alert}>
21-
<Paragraph><Trans i18nKey={'general.error_message'} components={{ a: <Link>Slack</Link> }}/></Paragraph>
20+
<Paragraph>{t('general.error_message')}</Paragraph>
2221
{!_useIsProdHack && <ErrorMessage>{error.message}</ErrorMessage>}
2322
<Center>
2423
<Button onClick={resetBoundary} size='small'>{t('general.try_again')}</Button>

frontend/packages/shared/src/contexts/ServicesContext.tsx

+2-8
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
1414
import { ToastContainer, Slide, toast } from 'react-toastify';
1515
import { ErrorBoundary } from 'react-error-boundary';
1616
import { AxiosError } from 'axios';
17-
import { Trans, useTranslation } from 'react-i18next';
18-
import { Link } from '@digdir/design-system-react';
17+
import { useTranslation } from 'react-i18next';
1918
import { ErrorBoundaryFallback } from '../components/ErrorBoundaryFallback';
2019

2120
import 'react-toastify/dist/ReactToastify.css';
@@ -46,12 +45,7 @@ const handleError = (
4645
return;
4746

4847
toast.error(
49-
() => (
50-
<Trans
51-
i18nKey={'general.error_message'}
52-
components={{ a: <Link inverted={true}>Slack</Link> }}
53-
/>
54-
),
48+
() => t('general.error_message'),
5549
{ toastId: 'default' }
5650
);
5751
};

0 commit comments

Comments
 (0)