Skip to content

Commit

Permalink
fix: history -> hash
Browse files Browse the repository at this point in the history
  • Loading branch information
56 committed Jul 22, 2020
1 parent 49a543d commit d45b679
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dashboard/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Suspense, useEffect, useMemo, useState } from 'react';
import { Redirect, Route, Router, Switch } from 'react-router-dom';
import { ConfigProvider } from 'antd';
import { createBrowserHistory } from 'history';
import { createHashHistory } from 'history';
import { useTranslation } from 'react-i18next';

import AppLayout from '@src/AppLayout';
Expand All @@ -10,7 +10,7 @@ import i18n, { antLocales } from '@src/i18n';
import { getMenus, getRoutes } from '@src/pages';
import { getLanguage, parseSearch } from '@src/tools';

const history = createBrowserHistory({ basename: process.env.NODE_ENV === 'production' ? '/admin/ui' : '/' });
const history = createHashHistory();
const getLang = (search: string) => {
const { lang } = parseSearch(search);
return getLanguage(lang);
Expand Down

0 comments on commit d45b679

Please sign in to comment.