wrapped calls in promise all
This commit is contained in:
@@ -75,10 +75,10 @@ const Home = (props) => {
|
||||
export const getServerSideProps = wrapper.getServerSideProps(
|
||||
(store) =>
|
||||
async ({ query, req, res }) => {
|
||||
const appealTypeData = await getAppealsTypes();
|
||||
const lpaData = await getLPA();
|
||||
console.log("appeal types", appealTypeData);
|
||||
console.log("lpa typeswwwww", lpaData);
|
||||
const [appealTypeData, lpaData] = await Promise.all([
|
||||
await getAppealsTypes(),
|
||||
await getLPA(),
|
||||
]);
|
||||
store.dispatch(setAppealType(appealTypeData));
|
||||
store.dispatch(setLPA(lpaData));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user