Handling Error
This commit is contained in:
@@ -7,12 +7,14 @@ import {observer} from "mobx-react-lite";
|
||||
import {FilterOutlined} from "@ant-design/icons";
|
||||
import {format, parseISO} from "date-fns";
|
||||
import {ModalLoaderContext} from "../../utils/modal";
|
||||
import { useParams } from "react-router-dom";
|
||||
|
||||
const {Title, Text} = Typography;
|
||||
|
||||
export const DetailUser = observer(() => {
|
||||
const store = useStore();
|
||||
const modalLoader = useContext(ModalLoaderContext);
|
||||
const { id } = useParams();
|
||||
|
||||
const routeData = [
|
||||
{
|
||||
@@ -24,12 +26,13 @@ export const DetailUser = observer(() => {
|
||||
name: <span style={{fontWeight: 'bold'}}>Detail User</span>,
|
||||
},
|
||||
];
|
||||
|
||||
console.log(id)
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
modalLoader.setLoading(true);
|
||||
await Promise.allSettled([
|
||||
store.authentication.getProfile(),
|
||||
store.transaction.getDataHistoryTopUp(id),
|
||||
store.transaction.getDataHistoryTransaction(),
|
||||
]);
|
||||
modalLoader.setLoading(false);
|
||||
@@ -83,7 +86,7 @@ export const DetailUser = observer(() => {
|
||||
<Text strong>Name</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Text>{store.authentication.profileData?.userDetail?.name}</Text>
|
||||
<Text>{store.transaction.data.name}</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Text strong>Role</Text>
|
||||
|
||||
Reference in New Issue
Block a user