chore(lint): unblock next lint and fix current eslint errors
This commit is contained in:
@@ -10,7 +10,6 @@ import {
|
||||
getPortalModuleDetails
|
||||
} from "../../actions/services/caseService";
|
||||
import data from "../../data/collections.json";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
import xpath from "xpath";
|
||||
|
||||
@@ -775,9 +774,7 @@ export const updateLinks = (input) => {
|
||||
return updated;
|
||||
};
|
||||
|
||||
export const whichRepType = (props) => {
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
export const whichRepType = (props, locale) => {
|
||||
let repType;
|
||||
let whichBaseType =
|
||||
props.currentView?.caseReference.repDetails.representationType ||
|
||||
@@ -785,14 +782,13 @@ export const whichRepType = (props) => {
|
||||
|
||||
switch (whichBaseType) {
|
||||
case "Statement":
|
||||
repType = router.locale == "cy" ? "Datganiad" : "Statment";
|
||||
repType = locale == "cy" ? "Datganiad" : "Statment";
|
||||
break;
|
||||
case "Questionnaire":
|
||||
repType = router.locale == "cy" ? "Holiadur" : "Questionnaire";
|
||||
repType = locale == "cy" ? "Holiadur" : "Questionnaire";
|
||||
break;
|
||||
case "Final comments":
|
||||
repType =
|
||||
router.locale == "cy" ? "Sylwadau terfynol" : "Final comments";
|
||||
repType = locale == "cy" ? "Sylwadau terfynol" : "Final comments";
|
||||
break;
|
||||
default:
|
||||
// code block
|
||||
|
||||
Reference in New Issue
Block a user