Merge branch 'develop' into 'devops-production'
Fixing Saldo See merge request empatnusabangsa/ppob/ppob-frontend!150
This commit is contained in:
commit
7bd9e23cd6
|
@ -1,7 +1,8 @@
|
||||||
import React, { useState } from "react";
|
import React, { useState,useEffect ,useContext} from "react";
|
||||||
import { Button, Drawer, Layout, Menu, Popover, Typography, Card } from "antd";
|
import { Button, Drawer, Layout, Menu, Popover, Typography, Card } from "antd";
|
||||||
import { MenuList } from "./MenuList";
|
import { MenuList } from "./MenuList";
|
||||||
import { Link, useHistory } from "react-router-dom";
|
import { Link, useHistory } from "react-router-dom";
|
||||||
|
import { ModalLoaderContext } from "../../utils/modal";
|
||||||
import {
|
import {
|
||||||
AlipayOutlined,
|
AlipayOutlined,
|
||||||
DatabaseOutlined,
|
DatabaseOutlined,
|
||||||
|
@ -37,11 +38,26 @@ const { Header, Content, Sider } = Layout;
|
||||||
const { SubMenu } = Menu;
|
const { SubMenu } = Menu;
|
||||||
|
|
||||||
export const DesktopLayout = observer(() => {
|
export const DesktopLayout = observer(() => {
|
||||||
|
const modalLoader = useContext(ModalLoaderContext);
|
||||||
let history = useHistory();
|
let history = useHistory();
|
||||||
const xl = useMediaQuery({ minWidth: 1024 });
|
const xl = useMediaQuery({ minWidth: 1024 });
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const [clicked, setClicked] = useState(false);
|
const [clicked, setClicked] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
(async () => {
|
||||||
|
modalLoader.setLoading(true);
|
||||||
|
|
||||||
|
await Promise.allSettled([
|
||||||
|
store.authentication.getProfile(),
|
||||||
|
store.transaction.getDataHistoryTransaction(),
|
||||||
|
]);
|
||||||
|
await store.transaction.getDataHistoryTopUpProfile(
|
||||||
|
store.authentication.profileData?.id
|
||||||
|
);
|
||||||
|
modalLoader.setLoading(false);
|
||||||
|
})();
|
||||||
|
}, []);
|
||||||
return (
|
return (
|
||||||
<Layout
|
<Layout
|
||||||
theme={"light"}
|
theme={"light"}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user