// material-ui
import {
Grid,
Typography,
Stack,
Button
} from '@mui/material';
import * as React from "react";
import { FormattedMessage, useIntl } from "react-intl";
import { useLocation } from "react-router-dom";
import { useNavigate } from "react-router-dom";
import Loadable from 'components/Loadable';
const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent')));
import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline';
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 Index = () => {
const intl = useIntl();
const location = useLocation();
const navigate = useNavigate()
const [onReady, setOnReady] = React.useState(false);
const showAccountLinkUpMessages = location?.state?.iAmSmartNewlyLinked === true;
React.useEffect(() => {
if ("iAmSmart" == location?.state?.loginMethod) {
setOnReady(true);
} else {
//setOnReady(true);
navigate('/dashboard');
}
}, []);
return (
!onReady ?
:
{/*row 1*/}
{showAccountLinkUpMessages ? (
) : null}
{/*row 2*/}
);
};
export default Index;