Skip to content

Commit

Permalink
fix: fix issue that home page redirect error (#4)
Browse files Browse the repository at this point in the history
* fix: fix issue that home page redirect error

* chore: update dumi version to fix nav errors in english

* chore: remove console
  • Loading branch information
Aarebecca authored Oct 26, 2023
1 parent 322c510 commit 025951a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .dumi/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@ const MainPage = () => {

const push = (link: string) => {
// @ts-ignore
history.push(`${locale.base}/${link}`);
const base = locale.base;
if (base === '/') history.push(`/${link}`);
else history.push(`${base}/${link}`);
};

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@types/react-dom": "^18.2.7",
"antd": "^5.8.4",
"copy-to-clipboard": "^3.3.3",
"dumi": "^2.2.13",
"dumi": "^2.2.14",
"husky": "^8.0.3",
"lint-staged": "^15.0.2",
"prettier": "^3.0.3",
Expand Down

0 comments on commit 025951a

Please sign in to comment.