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"; const MySubmittedReps = (props) => { let { t } = useTranslation(); const router = useRouter(); const { locale } = router; const { setCurrentView } = props; let recordCountVar = props.mySubmittedReps.mySubmittedReps; return (

{t("myportal:submitted-reps-card-title")}

{(props.myReps ? recordCountVar.length > 3 : recordCountVar["@odata.count"] > 3) && (
{ setCurrentView({ "viewName": "Submitted Representations", "viewKey": "mySubmittedReps", }); }} > {t("myportal:viewall-link-count", { count: props.mySubmittedReps.mySubmittedReps .length, })}
)}
); }; const mapDispatchToProps = (dispatch) => { return { setCurrentView: (currentView) => { dispatch(setCurrentView(currentView)); }, }; }; export default connect(null, mapDispatchToProps)(MySubmittedReps);