import useTranslation from "next-translate/useTranslation"; import Link from "next/link"; import { useRouter } from "next/router"; import { connect } from "react-redux"; import { setCurrentView } from "../../store/currentView/action"; import TopThree from "./topthree_reps"; const MyRepresentations = (props) => { let { t } = useTranslation(); const router = useRouter(); const { locale } = router; const { setCurrentView } = props; return (

{t("myportal:myrepresentations-card-title")}

{props.myRepresentations.myRepresentations["@odata.count"] > 3 && (
{ setCurrentView({ "viewName": "My Representations", "viewKey": "myRepresentations", }); }} > {t("myportal:viewall-link")}{" "} {props.isLPA && props.myRepresentations.myRepresentations[ "@odata.count" ] + " representations"}
)}
); }; const mapDispatchToProps = (dispatch) => { return { setCurrentView: (currentView) => { dispatch(setCurrentView(currentView)); }, }; }; export default connect(null, mapDispatchToProps)(MyRepresentations);