04122023
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
Avatar,
|
||||
|
||||
} from '@mui/material';
|
||||
import { enqueueSnackbar } from 'notistack';
|
||||
import LinearWithLabel from 'components/@extended/progress/LinearWithLabel';
|
||||
// import { PatternFormat } from 'react-number-format';
|
||||
import axios from 'axios';
|
||||
@@ -21,11 +22,12 @@ import axios from 'axios';
|
||||
import MainCard from 'components/MainCard';
|
||||
import { AimOutlined, EnvironmentOutlined, MailOutlined, PhoneOutlined } from '@ant-design/icons';
|
||||
import { useEffect ,useState} from 'react';
|
||||
|
||||
import Loader from 'components/Loader';
|
||||
|
||||
const Accountsettings = () => {
|
||||
const matchDownMD = useMediaQuery((theme) => theme.breakpoints.down('md'));
|
||||
const [info, setInfo] = useState({})
|
||||
const [info, setInfo] = useState({});
|
||||
const [loading,setLoading]=useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
if (localStorage.getItem('tenantid')) {
|
||||
@@ -35,20 +37,32 @@ const Accountsettings = () => {
|
||||
}, []);
|
||||
|
||||
const fetchaccount = async (tid) => {
|
||||
setLoading(true)
|
||||
await axios.get(`${process.env.REACT_APP_URL}/tenants/gettenantinfo/?tenantid=${tid}`)
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
if (res.data.status) {
|
||||
setInfo(res.data.details);
|
||||
}
|
||||
setLoading(false)
|
||||
}).catch((err) => {
|
||||
console.log(err)
|
||||
enqueueSnackbar(err.message, {
|
||||
variant: 'error', anchorOrigin: { vertical: 'top', horizontal: 'right' },
|
||||
autoHideDuration: 2000
|
||||
})
|
||||
setLoading(false)
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
return <>
|
||||
{loading &&
|
||||
|
||||
<Loader />
|
||||
|
||||
}
|
||||
<Grid container rowSpacing={4.5} columnSpacing={2.75}>
|
||||
<Grid item xs={12} sx={{ mb: -2.25 }}>
|
||||
<Stack direction={{ xs: 'column', md: 'row' }} justifyContent='space-between' alignItems='center' spacing={2}>
|
||||
|
||||
Reference in New Issue
Block a user