base flow for representations
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { setCurrentReference } from "../../store/currentView/action";
|
||||
import { connect } from "react-redux";
|
||||
|
||||
const ViewAllResults = (props) => {
|
||||
const { searchString, searchResultsObj, currentView, setCurrentReference } =
|
||||
props;
|
||||
|
||||
export default function ViewAllResults(props) {
|
||||
const { searchString, searchResultsObj, currentView } = props;
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
@@ -18,7 +22,15 @@ export default function ViewAllResults(props) {
|
||||
<div className="govuk-summary-list__row" key={key}>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-!-padding-left-2">
|
||||
<Link href="/case">
|
||||
<a>
|
||||
<a
|
||||
onClick={() => {
|
||||
setCurrentReference({
|
||||
"currentReference":
|
||||
resultsArr[index].reference,
|
||||
"currentType": currentView.viewKey,
|
||||
});
|
||||
}}
|
||||
>
|
||||
<span className="results-visually-hidden">
|
||||
Case Reference:
|
||||
</span>
|
||||
@@ -102,12 +114,25 @@ export default function ViewAllResults(props) {
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-button-group">
|
||||
<Link href="/myportal">
|
||||
<a className="govuk-button">Back</a>
|
||||
</Link>
|
||||
<a
|
||||
onClick={() => router.back()}
|
||||
className="govuk-button"
|
||||
>
|
||||
Back
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
setCurrentReference: (currentReference) => {
|
||||
dispatch(setCurrentReference(currentReference));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(null, mapDispatchToProps)(ViewAllResults);
|
||||
|
||||
Reference in New Issue
Block a user