removed hook reference to fix build
This commit is contained in:
@@ -11,7 +11,19 @@ import ReactPDF, {
|
||||
import { createElement } from "react";
|
||||
import Html from "react-pdf-html";
|
||||
import { getFormCollectionByID } from "../../components/utils";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
|
||||
import transLookupCY from "../../locales/cy/myrepresentations.json";
|
||||
import transLookupEN from "../../locales/en/myrepresentations.json";
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
|
||||
const getTrans = (locale, key) => {
|
||||
let jsonQuery = `$.${key}`;
|
||||
|
||||
let jsonObj = locale == "cy" ? transLookupCY : transLookupEN;
|
||||
|
||||
console.log(locale, jsonObj[key]);
|
||||
return jsonObj[key];
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
page: {
|
||||
@@ -89,7 +101,6 @@ const styles = StyleSheet.create({
|
||||
});
|
||||
|
||||
export const other_pdf = ({ docProps }) => {
|
||||
let { t } = useTranslation();
|
||||
//console.log("----", docProps);
|
||||
function formatDates(dateObj) {
|
||||
var dateObj = new Date(dateObj);
|
||||
@@ -164,10 +175,10 @@ export const other_pdf = ({ docProps }) => {
|
||||
>
|
||||
<Text style={styles.questionBullet}>1.</Text>
|
||||
<Text style={styles.questionText}>
|
||||
{t(
|
||||
"myrepresentations:s78-section-question-1"
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"s78-section-question-1"
|
||||
)}
|
||||
:
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
{values.caseRef}
|
||||
|
||||
Reference in New Issue
Block a user