Merge branch 'develop' into 'devops-staging'

Fixing Saldo

See merge request empatnusabangsa/ppob/ppob-frontend!149
This commit is contained in:
ajat sudrajat 2022-02-06 05:17:45 +00:00
commit 6c584ae3d5

View File

@ -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"}