get pending reps to dashboard from St Acc
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import TopThree from "./topthree_reps";
|
||||
import { connect } from "react-redux";
|
||||
import { setCurrentView } from "../../store/currentView/action";
|
||||
|
||||
const MyRepresentations = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const { setCurrentView } = props;
|
||||
|
||||
return (
|
||||
<div className="card" id="casescomment-card">
|
||||
<div className="card-body">
|
||||
<h3 className="heading-small card-heading">
|
||||
{t("myportal:myrepresentations-card-title")}dd
|
||||
</h3>
|
||||
<div className="cardModuleContainer">
|
||||
<TopThree
|
||||
showTopThree={props.myRepresentations.myRepresentations}
|
||||
showDetails={
|
||||
props.myRepresentations.myRepresentationsDetails
|
||||
}
|
||||
topThreeType={"myRepresentations"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{props.myRepresentations.myRepresentations["@odata.count"] >
|
||||
3 && (
|
||||
<div className="cardVieAll">
|
||||
<Link href="/myportal/viewall" shallow>
|
||||
<a
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
setCurrentView({
|
||||
"viewName": "My Representations",
|
||||
"viewKey": "myRepresentations",
|
||||
});
|
||||
}}
|
||||
>
|
||||
{t("myportal:viewall-link")}
|
||||
</a>
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
setCurrentView: (currentView) => {
|
||||
dispatch(setCurrentView(currentView));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(null, mapDispatchToProps)(MyRepresentations);
|
||||
Reference in New Issue
Block a user