mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 15:30:41 +09:00
Update web dependencies
- react: Update to new root rendering method - react-router: Replace useHistory with useNavigate - react-router: Replace <Switch> with <Routes> - reimplement sticky notice from scratch in ModPackViewPage - remove isomorphic-ws as it's latest version doesn't work and only saves one line of code. - remove import of antd.dark.css - fix misc css breakages.
This commit is contained in:
1 parent
8d98eaf3a5
commit
fd709fd98c
22 files changed
+143
-127
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useContext, useState } from "react";
|
||||
import { useHistory, useParams } from "react-router-dom";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import {
|
||||
Button, Col, Descriptions, Form, Input, Popconfirm,
|
||||
Row, Table, Tag, Select, Space, Spin, Switch,
|
||||
@@ -29,7 +29,7 @@ export default function UserViewPage() {
|
||||
let params = useParams();
|
||||
let userName = params.name;
|
||||
|
||||
let history = useHistory();
|
||||
let navigate = useNavigate();
|
||||
|
||||
let account = useAccount();
|
||||
let control = useContext(ControlContext);
|
||||
@@ -147,7 +147,7 @@ export default function UserViewPage() {
|
||||
control.send(
|
||||
new libData.UserDeleteRequest(userName)
|
||||
).then(() => {
|
||||
history.push("/users");
|
||||
navigate("/users");
|
||||
}).catch(notifyErrorHandler("Error deleting user"));
|
||||
}}
|
||||
>
|
||||
@@ -333,7 +333,7 @@ export default function UserViewPage() {
|
||||
rowKey={([id]) => id}
|
||||
onRow={([id], rowIndex) => ({
|
||||
onClick: event => {
|
||||
history.push(`/instances/${id}/view`);
|
||||
navigate(`/instances/${id}/view`);
|
||||
},
|
||||
})}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user