2 次代码提交

共有 1 个文件被更改,包括 11 次插入2 次删除
  1. +11
    -2
      src/routes/LoginRoutes.js

+ 11
- 2
src/routes/LoginRoutes.js 查看文件

@@ -1,4 +1,5 @@
import { lazy } from 'react';
import { useEffect } from "react";

// project import
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 PrivacyPolicyPage = Loadable(lazy(() => import('pages/extra-pages/PrivacyPolicyPage')));
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 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')));
// ==============================|| 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 = {
path: '/',
element: <MainLayout />,
@@ -82,7 +91,7 @@ const LoginRoutes = {
},
{
path: 'aboutUs',
element: <AboutUsPage/>
element: <ExternalRedirect to="https://www.gld.gov.hk/zh-cn/our-services/printing/advertising-gov-gazette/" />
},
{
path: 'userGuide',


正在加载...
取消
保存