added sas token authorization for azure relay

This commit is contained in:
robert.bond@test.gov.wales
2021-09-13 11:43:29 +01:00
parent 62066285cb
commit 84f75c9db8
3 changed files with 80 additions and 46 deletions
+9 -7
View File
@@ -12,7 +12,7 @@ import { useSelector, shallowEqual, connect } from "react-redux";
import { wrapper } from "../../store/store";
import Cookies from "cookies";
import { useRouter } from "next/router";
import { useState } from "react";
import { useEffect, useState } from "react";
import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath";
import { reduxForm, formValueSelector } from "redux-form";
@@ -26,10 +26,15 @@ import {
setAppealLPA,
getAppealTypeObj,
} from "../../store/appealType/action";
import { getAppealsTypes, getLPA } from "../../actions";
import { getAppealsTypes, getLPA, updateCase, createCase } from "../../actions";
import { setLPA } from "../../store/lpa/action";
const Home = (props) => {
// useEffect(() => {
// // updateCase("3ffcf47c-5811-ec11-aac9-00224800be9c", "846040004");
// createCase();
// });
const { footerLinks, pages, formData } = props;
let { t, lang } = useTranslation();
@@ -75,14 +80,11 @@ const Home = (props) => {
export const getServerSideProps = wrapper.getServerSideProps(
(store) =>
async ({ query, req, res }) => {
res.setHeader(
"Cache-Control",
"public, s-maxage=604800, stale-while-revalidate"
);
const [appealTypeData, lpaData] = await Promise.all([
const [appealTypeData, lpaData, caseData] = await Promise.all([
await getAppealsTypes(),
await getLPA(),
]);
store.dispatch(setAppealType(appealTypeData));
store.dispatch(setLPA(lpaData));
}