27 lines
787 B
JavaScript
27 lines
787 B
JavaScript
import React from "react";
|
|
import useTranslation from "next-translate/useTranslation";
|
|
import { useRouter } from "next/router";
|
|
import { Field } from "redux-form";
|
|
import { RenderCheckBox } from "./renderCheckBox";
|
|
|
|
export function CheckBoxfield(props) {
|
|
const router = useRouter();
|
|
let { t } = useTranslation();
|
|
|
|
const fieldOptions =
|
|
router.locale == "cy" ? ["Ydw", "Na", "2323"] : ["Yes", "No", "23232"];
|
|
|
|
return (
|
|
<Field
|
|
name={props.name}
|
|
datafieldname={props.datafieldname}
|
|
label={props.label}
|
|
options={fieldOptions}
|
|
id={props.id}
|
|
className={props.className}
|
|
errorMsg={t("newappeal:select-an-option-label")}
|
|
component={RenderCheckBox}
|
|
/>
|
|
);
|
|
}
|