36 lines
992 B
JavaScript
36 lines
992 B
JavaScript
import Link from "next/link";
|
|
import { useRouter } from "next/router";
|
|
import useTranslation from "next-translate/useTranslation";
|
|
import { DiagConsoleLogger } from "@opentelemetry/api";
|
|
|
|
const CRMError = (props) => {
|
|
let { t } = useTranslation();
|
|
|
|
const { whichError } = props;
|
|
|
|
const router = useRouter();
|
|
const { locale } = router;
|
|
|
|
const errorSwitch = _.has(props, "whichError")
|
|
? "LPAData"
|
|
: "searchResultsObj";
|
|
|
|
console.log(errorSwitch);
|
|
|
|
return (
|
|
<div className="govuk-grid-row">
|
|
<div className="govuk-grid-column-full">
|
|
<h1 className="govuk-heading-xl govuk-!-margin-bottom-7">
|
|
Something has happened....
|
|
</h1>
|
|
<p>
|
|
{props.props[errorSwitch][errorSwitch].errorCode} -{" "}
|
|
{props.props[errorSwitch][errorSwitch].errorMsg}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default CRMError;
|