import Link from "next/link"; import { connect } from "react-redux"; import { useRouter } from "next/router"; import useTranslation from "next-translate/useTranslation"; import { Field, reduxForm } from "redux-form"; import { RenderPickList, RenderTextfield, RenderRadioList, RenderMultiline, RenderRichMultiline, RenderCondtionalRadioList, FileUploadField, } from "./representationElements"; import { getFormCollectionByID, getThumbnailIconByExtension, bytesToSize, } from "../../utils"; import { useDropzone } from "react-dropzone"; const RepAgent = (props) => { let { t } = useTranslation(); const router = useRouter(); const { locale } = router; const { formObj, appellantApplicantRepresentationArr, setRepresentationCapacity, setRepresentationSubmit, currentView, } = props; const { acceptedFiles, getRootProps, getInputProps } = useDropzone(); const files = acceptedFiles.map((file) => (
  • {file.path} - {file.size} bytes
  • )); const required = (value) => (value ? undefined : "Required"); return ( <>

    {t( "myrepresentations:representation-from-an-agent-heading" )}

    {/*
    */}

    {t("myrepresentations:enter-comment-label")}

    {t("myrepresentations:comments-set-out-label")}:

    {t("myrepresentations:publish-policy-label")} https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html

    {props.currentView.caseReference.hasOwnProperty( "repDetails" ) && props.currentView.caseReference.repDetails.filesList .length > 0 ? (
    {props.currentView.caseReference.repDetails.filesList.map( (blob, i) => (
    {blob.name} {blob.name} ( {bytesToSize(blob.size)})
    ) )}
    ) : ( "" )}
    {" "}
    {/* { setRepresentationSubmit(true); }} className="govuk-button" > {t("common:continue-button")} ww */} { setRepresentationCapacity(); }} className="govuk-link" > {t("common:back-link")}
    ); }; export default RepAgent;