| @@ -1,4 +1,5 @@ | |||||
| import { lazy } from 'react'; | import { lazy } from 'react'; | ||||
| import { useEffect } from "react"; | |||||
| // project import | // project import | ||||
| import Loadable from 'components/Loadable'; | import Loadable from 'components/Loadable'; | ||||
| @@ -15,7 +16,6 @@ const IAmSmartRegister = Loadable(lazy(() => import('pages/authentication/IAmSma | |||||
| const ErrorPage = Loadable(lazy(() => import('pages/extra-pages/ErrorPage'))); | const ErrorPage = Loadable(lazy(() => import('pages/extra-pages/ErrorPage'))); | ||||
| const PrivacyPolicyPage = Loadable(lazy(() => import('pages/extra-pages/PrivacyPolicyPage'))); | const PrivacyPolicyPage = Loadable(lazy(() => import('pages/extra-pages/PrivacyPolicyPage'))); | ||||
| const ImportantNoticePage = Loadable(lazy(() => import('pages/extra-pages/ImportantNoticePage'))); | const ImportantNoticePage = Loadable(lazy(() => import('pages/extra-pages/ImportantNoticePage'))); | ||||
| const AboutUsPage = Loadable(lazy(() => import('pages/extra-pages/AboutUs'))); | |||||
| const UserMenuPub1Page = Loadable(lazy(() => import('pages/extra-pages/UserMenuPub1'))); | const UserMenuPub1Page = Loadable(lazy(() => import('pages/extra-pages/UserMenuPub1'))); | ||||
| const DatabaseHealthCheckPage = Loadable(lazy(() => import('pages/extra-pages/DatabaseHealthCheck'))); | const DatabaseHealthCheckPage = Loadable(lazy(() => import('pages/extra-pages/DatabaseHealthCheck'))); | ||||
| @@ -44,6 +44,15 @@ const Testfps = Loadable(lazy(() => import('pages/Payment/FPS/FPSTest'))); | |||||
| const Payment_FPS_CallBack = Loadable(lazy(() => import('pages/Payment/FPS/fpscallback'))); | const Payment_FPS_CallBack = Loadable(lazy(() => import('pages/Payment/FPS/fpscallback'))); | ||||
| // ==============================|| AUTH ROUTING ||============================== // | // ==============================|| AUTH ROUTING ||============================== // | ||||
| function ExternalRedirect({ to, replace = true }) { | |||||
| useEffect(() => { | |||||
| if (replace) window.location.replace(to); | |||||
| else window.location.href = to; | |||||
| }, [to, replace]); | |||||
| return null; | |||||
| } | |||||
| const LoginRoutes = { | const LoginRoutes = { | ||||
| path: '/', | path: '/', | ||||
| element: <MainLayout />, | element: <MainLayout />, | ||||
| @@ -82,7 +91,7 @@ const LoginRoutes = { | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'aboutUs', | path: 'aboutUs', | ||||
| element: <AboutUsPage/> | |||||
| element: <ExternalRedirect to="https://www.gld.gov.hk/zh-cn/our-services/printing/advertising-gov-gazette/" /> | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'userGuide', | path: 'userGuide', | ||||