Replaced react Link with custom component

The custom component merges the behaviour of antd Typography.Link and the react-router.dom Link after the custom component prop was removed in v6 according to this guide: https://reactrouter.com/en/main/upgrading/v5#remove-link-component-prop
This commit is contained in:
Danielv123 committed 2024-02-09 09:11:53 +03:00
1 parent 89919f7a89
commit 8879f8dd80
5 files changed
+60 -11

No files matched your search

+2 -1
View File
@@ -1,5 +1,5 @@
import React, { useEffect, useContext, useState } from "react";
import { Link, useNavigate } from "react-router-dom";
import { useNavigate } from "react-router-dom";
import { Button, Form, Input, Modal, Space, Table, Tag } from "antd";
import * as lib from "@clusterio/lib";
@@ -12,6 +12,7 @@ import PageHeader from "./PageHeader";
import PageLayout from "./PageLayout";
import PluginExtra from "./PluginExtra";
import { formatFirstSeen, formatLastSeen, sortFirstSeen, sortLastSeen, useUsers } from "../model/user";
import Link from "./Link";
const strcmp = new Intl.Collator(undefined, { numeric: true, sensitivity: "base" }).compare;