|
|
@@ -3,9 +3,12 @@ import { |
|
|
|
Grid, |
|
|
|
Typography, |
|
|
|
Stack, |
|
|
|
Button |
|
|
|
} from '@mui/material'; |
|
|
|
import * as React from "react"; |
|
|
|
|
|
|
|
import { FormattedMessage } 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'))); |
|
|
|
|
|
|
@@ -23,11 +26,16 @@ const BackgroundHead = { |
|
|
|
// ==============================|| DASHBOARD - DEFAULT ||============================== // |
|
|
|
|
|
|
|
const Index = () => { |
|
|
|
|
|
|
|
const location = useLocation(); |
|
|
|
const navigate = useNavigate() |
|
|
|
const [onReady, setOnReady] = React.useState(false); |
|
|
|
|
|
|
|
React.useEffect(() => { |
|
|
|
setOnReady(true); |
|
|
|
if("iAmSmart"==location.state.loginMethod){ |
|
|
|
setOnReady(true); |
|
|
|
}else{ |
|
|
|
navigate('/dashboard'); |
|
|
|
} |
|
|
|
}, []); |
|
|
|
|
|
|
|
return ( |
|
|
@@ -42,7 +50,9 @@ const Index = () => { |
|
|
|
<Grid item xs={12} width="100%"> |
|
|
|
<div style={BackgroundHead} width="100%"> |
|
|
|
<Stack direction="row" height='70px'> |
|
|
|
<Typography ml={15} color='#FFF' variant="h4" sx={{ pt: 2 }}>iAM Smart 成功登入</Typography> |
|
|
|
<Typography ml={15} color='#FFF' variant="h4" sx={{ pt: 2 }}> |
|
|
|
<FormattedMessage id="loginSuccessMessage1" /> |
|
|
|
</Typography> |
|
|
|
</Stack> |
|
|
|
</div> |
|
|
|
</Grid> |
|
|
@@ -51,18 +61,31 @@ const Index = () => { |
|
|
|
<Grid container justifyContent="flex-start" alignItems="center" > |
|
|
|
<center> |
|
|
|
<Grid item xs={12} md={12} > |
|
|
|
|
|
|
|
<Typography variant="h3" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "center" }}> |
|
|
|
iAM Smart 成功登入 |
|
|
|
<FormattedMessage id="loginSuccessMessage2" /> |
|
|
|
</Typography> |
|
|
|
|
|
|
|
</Grid> |
|
|
|
</center> |
|
|
|
</Grid> |
|
|
|
</Grid> |
|
|
|
{/*row 2*/} |
|
|
|
<Grid item xs={12} md={12} > |
|
|
|
<Grid container justifyContent="flex-start" alignItems="center" > |
|
|
|
<center> |
|
|
|
<Button |
|
|
|
component="span" |
|
|
|
variant="contained" |
|
|
|
size="large" |
|
|
|
sx={{ m: 4 }} |
|
|
|
onClick={() => { navigate("/dashboard"); }} |
|
|
|
> |
|
|
|
<FormattedMessage id="loginSuccessMessage3" /> |
|
|
|
</Button> |
|
|
|
</center> |
|
|
|
</Grid> |
|
|
|
</Grid> |
|
|
|
</Grid > |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
); |
|
|
|
}; |
|
|
|