added spinner to advanced search

This commit is contained in:
2021-09-23 15:14:20 +01:00
parent 90e8bf9856
commit fb27d72ed3
20 changed files with 409 additions and 299 deletions
+12 -3
View File
@@ -1,4 +1,5 @@
import _ from "lodash";
import { useState } from "react";
import Head from "next/head";
import Header from "../components/header";
import Banner from "../components/banner";
@@ -21,7 +22,13 @@ import {
setAppealLPA,
getAppealTypeObj,
} from "../store/appealType/action";
import { getAppealsTypes, getLPA, updateCase, createCase } from "../actions";
import {
getAppealsTypes,
getLPA,
updateCase,
createCase,
getSASToken,
} from "../actions";
import { setLPA } from "../store/lpa/action";
const Home = (props) => {
@@ -59,9 +66,11 @@ const Home = (props) => {
export const getServerSideProps = wrapper.getServerSideProps(
(store) =>
async ({ query, req, res }) => {
const token = await getSASToken();
const [appealTypeData, lpaData, caseData] = await Promise.all([
await getAppealsTypes(),
await getLPA(),
await getAppealsTypes(token),
await getLPA(token),
]);
store.dispatch(setAppealType(appealTypeData));