// material-ui import {Grid, Typography} from '@mui/material'; import {useEffect, useState} from "react"; import * as React from "react"; //import axios from "axios"; import * as HttpUtils from "../../utils/HttpUtils"; import {useParams} from "react-router-dom"; import UserInformationCard from "./UserInformationCard_Individual"; import LoadingComponent from "../extra-pages/LoadingComponent"; import * as UrlUtils from "../../utils/ApiPathConst"; // ==============================|| DASHBOARD - DEFAULT ||============================== // const UserMaintainPage_Individual = () => { const params = useParams(); const [userData, setUserData] = useState({}) const [userFile, setUserFile] = useState({}) const [isLoading, setLoding] = useState(true); useEffect(()=>{ loadData(); },[]); const loadData = ()=>{ setLoding(true); HttpUtils.get({ url: `${UrlUtils.GET_IND_USER_PATH}/${params.id}`, onSuccess: function(response){ response.data["address"] = JSON.parse(response.data["address"]); response.data["contactTel"] = JSON.parse(response.data["contactTel"]); response.data["faxNo"] = JSON.parse(response.data["faxNo"]); setUserData(response.data); setUserFile(response.userFile) } }); }; useEffect(() => { setLoding(false); }, [userData]); return ( isLoading ? : Individual User {/*col 1*/} {/*col 2*/} ); }; export default UserMaintainPage_Individual;