From 97fb498654d51e5757a79aab136ebdedfd902bc1 Mon Sep 17 00:00:00 2001 From: "ajat91.sudrajat" Date: Sun, 6 Feb 2022 12:51:37 +0700 Subject: [PATCH] Bug Fix --- src/pages/App/DesktopLayout.js | 68 ++++++++++++++++------------------ 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/src/pages/App/DesktopLayout.js b/src/pages/App/DesktopLayout.js index bf2edd2..d1699a4 100644 --- a/src/pages/App/DesktopLayout.js +++ b/src/pages/App/DesktopLayout.js @@ -1,4 +1,4 @@ -import React, { useState,useEffect ,useContext} from "react"; +import React, { useState, useEffect, useContext } from "react"; import { Button, Drawer, Layout, Menu, Popover, Typography, Card } from "antd"; import { MenuList } from "./MenuList"; import { Link, useHistory } from "react-router-dom"; @@ -47,14 +47,7 @@ export const DesktopLayout = observer(() => { useEffect(() => { (async () => { modalLoader.setLoading(true); - - await Promise.allSettled([ - store.authentication.getProfile(), - store.transaction.getDataHistoryTransaction(), - ]); - await store.transaction.getDataHistoryTopUpProfile( - store.authentication.profileData?.id - ); + await Promise.allSettled([store.authentication.getProfile()]); modalLoader.setLoading(false); })(); }, []); @@ -387,7 +380,6 @@ export const DesktopLayout = observer(() => { > {store.ui.mediaQuery.isMobile && (
{ visible={clicked} onVisibleChange={() => setClicked(!clicked)} > - {new Intl.NumberFormat("id-ID", { - style: "currency", - currency: "IDR", - }).format(store.authentication.profileData?.wallet || 0)} + {store.authentication.userData.role !== "Admin" && + new Intl.NumberFormat("id-ID", { + style: "currency", + currency: "IDR", + }).format(store.authentication.profileData?.wallet || 0)} +
- - Saldo :{" "} - {new Intl.NumberFormat("id-ID", { - style: "currency", - currency: "IDR", - }).format(store.authentication.profileData?.wallet || 0)} - - } - style={{ - marginRight: 10, - width: 210, - height: 31, - }} - > + {store.authentication.userData.role !== "Admin" && ( + + Saldo :{" "} + {new Intl.NumberFormat("id-ID", { + style: "currency", + currency: "IDR", + }).format(store.authentication.profileData?.wallet || 0)} + + } + style={{ + marginRight: 10, + width: 210, + height: 31, + }} + > + )}