mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 07:33:12 +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, { useContext, useRef, useState, useEffect } from "react";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { Button, Form, InputNumber, Modal, Table, Tag, Typography } from "antd";
|
||||
import CopyOutlined from "@ant-design/icons/lib/icons/CopyOutlined";
|
||||
|
||||
@@ -178,7 +178,7 @@ function CopyButton({ text, message }) {
|
||||
|
||||
export default function HostsPage() {
|
||||
let account = useAccount();
|
||||
let history = useHistory();
|
||||
let navigate = useNavigate();
|
||||
let [hostList] = useHostList();
|
||||
|
||||
return <PageLayout nav={[{ name: "Hosts" }]}>
|
||||
@@ -226,7 +226,7 @@ export default function HostsPage() {
|
||||
pagination={false}
|
||||
onRow={(record, rowIndex) => ({
|
||||
onClick: event => {
|
||||
history.push(`/hosts/${record.id}/view`);
|
||||
navigate(`/hosts/${record.id}/view`);
|
||||
},
|
||||
})}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user