您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

63 行
2.2 KiB

  1. // material-ui
  2. import {
  3. Grid,
  4. Typography,
  5. Button
  6. } from '@mui/material';
  7. import * as React from "react";
  8. import { useNavigate } from "react-router-dom";
  9. import Loadable from 'components/Loadable';
  10. const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent')));
  11. // ==============================|| DASHBOARD - DEFAULT ||============================== //
  12. const Index = () => {
  13. const navigate = useNavigate()
  14. const [onReady, setOnReady] = React.useState(false);
  15. React.useEffect(() => {
  16. setOnReady(true);
  17. }, []);
  18. return (
  19. !onReady ?
  20. <Grid container sx={{ minHeight: '95vh', mb: 3 }} direction="column" justifyContent="center" alignItems="center">
  21. <Grid item>
  22. <LoadingComponent />
  23. </Grid>
  24. </Grid>
  25. :
  26. <Grid container sx={{ height: '100%', backgroundColor: '#fff' }} direction="column" justifyContent="flex-start" alignItems="center" >
  27. <Grid item xs={12} md={12} >
  28. <Grid container justifyContent="flex-start" alignItems="center" >
  29. <center>
  30. <Grid item xs={12} md={12} >
  31. <Typography variant="h3" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "center" }}>
  32. 登入失敗,請重試。
  33. </Typography>
  34. <Button
  35. component="span"
  36. variant="contained"
  37. size="large"
  38. sx={{ m: 4 }}
  39. onClick={() => {
  40. navigate("/login");
  41. }}
  42. >返回登入</Button>
  43. </Grid>
  44. </center>
  45. </Grid>
  46. </Grid>
  47. {/*row 2*/}
  48. </Grid >
  49. );
  50. };
  51. export default Index;