// material-ui
import {
Grid,
Typography,
Stack,
// Button
} from '@mui/material';
import MainCard from "../../../components/MainCard";
import { useEffect, useState, lazy } from "react";
import { getSearchCriteria } from "auth/utils";
import Loadable from 'components/Loadable';
const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingComponent')));
const SearchForm = Loadable(lazy(() => import('./UserSearchForm')));
const EventTable = Loadable(lazy(() => import('./UserTable')));
import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'
const BackgroundHead = {
backgroundImage: `url(${titleBackgroundImg})`,
width: '100%',
height: '100%',
backgroundSize: 'contain',
backgroundRepeat: 'no-repeat',
backgroundColor: '#0C489E',
backgroundPosition: 'right'
}
// ==============================|| DASHBOARD - DEFAULT ||============================== //
const UserSettingPage = () => {
// const [record, setRecord] = useState([]);
const [searchCriteria, setSearchCriteria] = useState({});
const [onReady, setOnReady] = useState(false);
const [onGridReady, setGridOnReady] = useState(false);
//const [changelocked, setChangeLocked] = useState(false);
// useLayoutEffect(() => {
// getUserList();
// }, [changelocked]);
useEffect(() => {
if (Object.keys(getSearchCriteria(window.location.pathname)).length>0){
setSearchCriteria(getSearchCriteria(window.location.pathname))
}else{
localStorage.setItem('searchCriteria',"")
setSearchCriteria({})
}
}, []);
useEffect(() => {
setOnReady(true);
}, [searchCriteria]);
// useLayoutEffect(() => {
// getUserList();
// }, [searchCriteria]);
// function getUserList() {
// axios.get(`${GLD_USER_PATH}`,
// { params: searchCriteria }
// )
// .then((response) => {
// if (response.status === 200) {
// setRecord(response.data);
// }
// })
// .catch(error => {
// console.log(error);
// return false;
// });
// }
function applySearch(input) {
setGridOnReady(true)
setSearchCriteria(input);
localStorage.setItem('searchCriteria', JSON.stringify({path:window.location.pathname,data:input}))
}
function applyGridOnReady(input) {
setGridOnReady(input);
}
return (
!onReady ?
:
View GLD User
{/*row 1*/}
{/*row 2*/}
);
};
export default UserSettingPage;