浏览代码

add Important Notice

CR003
Anna Ho 1年前
父节点
当前提交
aa370d75ed
共有 3 个文件被更改,包括 66 次插入2 次删除
  1. +1
    -2
      src/components/cards/AuthFooter.js
  2. +60
    -0
      src/pages/extra-pages/ImportantNotice.js
  3. +5
    -0
      src/routes/LoginRoutes.js

+ 1
- 2
src/components/cards/AuthFooter.js 查看文件

@@ -26,7 +26,7 @@ const AuthFooter = () => {
variant="subtitle2"
color="secondary"
component={Link}
// href="https://material-ui.com/store/contributors/codedthemes/"
href="/importantNotice"
target="_blank"
underline="hover"
>
@@ -37,7 +37,6 @@ const AuthFooter = () => {
color="secondary"
component={Link}
href="/privacyPolicy"
//href="/testMailPage"
target="_blank"
underline="hover"
>


+ 60
- 0
src/pages/extra-pages/ImportantNotice.js 查看文件

@@ -0,0 +1,60 @@
import { Grid, Typography, Stack, } from '@mui/material';
import { useState, useEffect, lazy } from "react";

import Loadable from 'components/Loadable';
import { useIntl, FormattedMessage } from "react-intl";

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'
}

const LoadingComponent = Loadable(lazy(() => import('pages/extra-pages/LoadingComponent')));

const ImportantNotice = () => {
const intl = useIntl();
const [onReady, setOnReady] = useState(false);

useEffect(() => {
setOnReady(true);

}, []);




return (
!onReady ?
<Grid container sx={{ minHeight: '87vh', mb: 3 }} direction="column" justifyContent="center" alignItems="center">
<Grid item>
<LoadingComponent />
</Grid>
</Grid>
:
(
<Grid container justifyContent="center" alignItems="center" >
<Grid item xs={12}>
<div style={BackgroundHead}>
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center">
<Typography ml={15} color='#FFF' variant="h4" sx={{ display: { xs: 'none', sm: 'none', md: 'block', pt: 2 } }}>
<FormattedMessage id="importantNotice" />
</Typography>
</Stack>
</div>
</Grid>
<Grid item xs={10} md={5}>
<div style={{ padding: 12 }} dangerouslySetInnerHTML={{ __html: intl.formatMessage({ id: "termsAndCon" }) }} />
</Grid>
</Grid>
)
);

}

export default ImportantNotice;

+ 5
- 0
src/routes/LoginRoutes.js 查看文件

@@ -13,6 +13,7 @@ const BusRegisterForm = Loadable(lazy(() => import('pages/authentication/BusRegi
const IAmSmartRegister = Loadable(lazy(() => import('pages/authentication/IAmSmartRegister')));
const ErrorPage = Loadable(lazy(() => import('pages/extra-pages/ErrorPage')));
const PrivacyPolicyPage = Loadable(lazy(() => import('pages/extra-pages/PrivacyPolicy')));
const ImportantNoticePage = Loadable(lazy(() => import('pages/extra-pages/ImportantNotice')));
const AboutUsPage = Loadable(lazy(() => import('pages/AboutUs')));

const ForgotPassword = Loadable(lazy(() => import('pages/authentication/ForgotPassword')));
@@ -71,6 +72,10 @@ const LoginRoutes = {
path: 'privacyPolicy',
element: <PrivacyPolicyPage/>
},
{
path: 'importantNotice',
element: <ImportantNoticePage/>
},
{
path: 'aboutUs',
element: <AboutUsPage/>


正在加载...
取消
保存