Files
pedwfrontend/pages/myportal/case.js
T

98 lines
3.7 KiB
JavaScript

import useTranslation from "next-translate/useTranslation";
import Head from "next/head";
import { useRouter } from "next/router";
import { connect } from "react-redux";
import Breadcrumbs from "../../components/breadcrumbs";
import Case from "../../components/case";
import CookieBanner from "../../components/cookieBanner";
import Footer from "../../components/footer";
import Header from "../../components/header";
import TimeOut from "../../components/timeout";
const Home = (props) => {
const { footerLinks, pages, showRepresentations } = props;
let { t, lang } = useTranslation();
const router = useRouter();
const { locale } = router;
const { appealtypes } = router.query;
return (
<div>
<Head>
<title>
{t("case:page-title")}:{" "}
{props.currentView.caseReference.currentReference}{" "}
{t("common:service-name")}{" "}
</title>
</Head>
<div id="page_wrapper">
<CookieBanner />
<Header courseName={t("common:service-name")} />
<div className="govuk-width-container">
<Breadcrumbs slug={appealtypes} props={props} />
<Case
props={props}
myCases={props.myCases.myCases}
myCasesDetails={props.myCases.myCasesDetails}
searchResultsObj={
props.searchResultsObj.searchResultsObj
}
searchDetailsObj={
props.searchResultsObj.searchDetailsObj
}
documentDetailsObj={
props.searchResultsObj.documentDetailsObj
}
myRepresentations={
props.myRepresentations.myRepresentations
}
watchedCases={props.watchedCases.watchedCases}
watchedCasesDetails={
props.watchedCases.watchedCasesDetails
}
awaitingSubmission={
props.awaitingSubmission.awaitingSubmission
}
caseReference={
props.currentView.caseReference.currentReference
}
currentType={
props.currentView.caseReference.currentType
}
appealTypeID={
props.currentView.caseReference.appealType
}
incidentid={props.currentView.caseReference.incidentid}
representationsObj={
props.searchResultsObj.representationsObj
}
showRepresentations={showRepresentations}
/>
</div>
<Footer footerLinks={footerLinks} />
</div>
<TimeOut />
</div>
);
};
const mapStateToProps = (state) => {
//console.log(state);
return {
currentView: state.currentView,
search: state.search,
searchResultsObj: state.searchResultsObj,
formData: state.formData,
appealType: state.appealType,
form: state.form,
myCases: state.myCases,
watchedCases: state.watchedCases,
myRepresentations: state.myRepresentations,
awaitingSubmission: state.awaitingSubmission,
};
};
export default connect(mapStateToProps)(Home);