import { setEventDetails } from "../../store/searchOutput/action"; import { setCurrentPage } from "../../store/currentView/action"; import { connect } from "react-redux"; import useTranslation from "next-translate/useTranslation"; import { formatDates } from "../utils"; import { useState } from "react"; const statusClassMap = { complete: "govuk-tag govuk-!-margin-top-2", "in-progress": "govuk-tag govuk-tag--yellow govuk-!-margin-top-2", "not-started": "govuk-tag govuk-tag--grey govuk-!-margin-top-2", blocked: "govuk-tag govuk-tag--red govuk-!-margin-top-2" }; const statusTextMap = { complete: "Complete", "in-progress": "In progress", "not-started": "Not started", blocked: "Blocked" }; const StatusDetails = (props) => { let { t } = useTranslation(); const stages = [ { id: "application-received", title: "Application received", status: "complete", href: "#", description: "We have received the case and checked that the initial information has been provided." }, { id: "consultation", title: "Consultation period", status: "in-progress", href: "#", description: "People can view the case documents and submit comments during this stage." }, { id: "decision", title: "Decision", status: "not-started", href: "#", description: "The decision will be published once the case has been reviewed and completed." } ]; const EventView = (eventsArr) => { eventsArr = eventsArr.value; return eventsArr.map((item, key) => {