Skip to content

Commit

Permalink
fix(portal-web): 修复文件管理跳转路径导致的控制台报错 (#1015)
Browse files Browse the repository at this point in the history
![image](https://github.com/PKUHPC/SCOW/assets/140392039/12d0dcd6-d855-4d80-ac3b-98d735304e57)
```typescript
// return <Redirect url={`/files/${cluster}/${data?.path ?? ""}`} />;
return <Redirect url={join("/files", cluster, data?.path ?? "")} />;
```
  • Loading branch information
Miracle575 authored Nov 30, 2023
1 parent 1a1189a commit 9a47c21
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/red-meals-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@scow/portal-web": patch
---

修复文件管理跳转路径导致的控制台报错
3 changes: 2 additions & 1 deletion apps/portal-web/src/pages/files/[cluster]/~.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { queryToString } from "@scow/lib-web/build/utils/querystring";
import { Spin } from "antd";
import { NextPage } from "next";
import { useRouter } from "next/router";
import { join } from "path";
import { useCallback } from "react";
import { useAsync } from "react-async";
import { api } from "src/apis";
Expand All @@ -39,7 +40,7 @@ export const HomeDirFileManagerPage: NextPage = requireAuth(() => true)(() => {
return <ServerErrorPage />;
}

return <Redirect url={`/files/${cluster}/${data?.path ?? ""}`} />;
return <Redirect url={join("/files", cluster, data?.path ?? "")} />;
});

export default HomeDirFileManagerPage;
Expand Down

0 comments on commit 9a47c21

Please sign in to comment.