diff --git a/frontend/src/System/ListSystems.js b/frontend/src/System/ListSystems.js index 7e01cbf..79772e6 100644 --- a/frontend/src/System/ListSystems.js +++ b/frontend/src/System/ListSystems.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { Link } from 'react-router-dom' +import { Link, useNavigate } from 'react-router-dom' import SystemCard from "./SystemCard"; import { Container, @@ -18,7 +18,7 @@ const ListSystems = (props) => { const {data:systems, isSuccess} = useGetSystemsQuery(); - + const navigate = useNavigate(); return (
@@ -30,7 +30,7 @@ const ListSystems = (props) => { {isSuccess&&systems.systems.map((system) => - system.active&& this.props.changeUrl("/system/" + system.shortName)}/> + system.active&& navigate("/system/" + system.shortName)}/> // this.props.changeUrl("/system/" + system.shortName)}/> )}