diff --git a/packages/console/src/App.tsx b/packages/console/src/App.tsx index 1e3534f8a..439c4d0cd 100644 --- a/packages/console/src/App.tsx +++ b/packages/console/src/App.tsx @@ -9,6 +9,8 @@ import Sidebar, { getPath, sections } from './components/Sidebar'; import Topbar from './components/Topbar'; import initI18n from './i18n/init'; +const isBasenameNeeded = process.env.NODE_ENV !== 'development' || process.env.PORT === '5002'; + void initI18n(); const Main = () => { @@ -33,7 +35,7 @@ const Main = () => { }; const App = () => ( - +
); diff --git a/packages/console/src/components/Sidebar/components/Item/index.tsx b/packages/console/src/components/Sidebar/components/Item/index.tsx index 0223b3958..b595f31af 100644 --- a/packages/console/src/components/Sidebar/components/Item/index.tsx +++ b/packages/console/src/components/Sidebar/components/Item/index.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import React, { ReactChild } from 'react'; +import { Link } from 'react-router-dom'; import { getPath } from '../../utils'; import * as styles from './index.module.scss'; @@ -12,10 +13,10 @@ type Props = { const Item = ({ icon, title, isActive = false }: Props) => { return ( - + {icon &&
{icon}
}
{title}
-
+ ); }; diff --git a/packages/console/src/include.d/node.d.ts b/packages/console/src/include.d/node.d.ts new file mode 100644 index 000000000..c4b13ce38 --- /dev/null +++ b/packages/console/src/include.d/node.d.ts @@ -0,0 +1,5 @@ +type Process = { + env: Record; +}; + +declare const process: Process; diff --git a/packages/core/src/middleware/koa-spa-proxy.ts b/packages/core/src/middleware/koa-spa-proxy.ts index 5d8d2bbfc..43edf7039 100644 --- a/packages/core/src/middleware/koa-spa-proxy.ts +++ b/packages/core/src/middleware/koa-spa-proxy.ts @@ -39,6 +39,7 @@ export default function koaSpaProxy app !== prefix && requestPath.startsWith(`/${app}`)) ) { return next();