Fix player list routing to wrong player url

Affects issues:
- Fixed #2609
This commit is contained in:
Aurora Lahtela 2022-09-25 09:20:39 +03:00
parent 4d2a327693
commit 5c9e0deed4

View File

@ -5,6 +5,7 @@ import React, {useEffect, useState} from "react";
import {faUsers} from "@fortawesome/free-solid-svg-icons";
import DataTablesTable from "../../table/DataTablesTable";
import {CardLoader} from "../../navigation/Loader";
import {baseAddress} from "../../../service/backendConfiguration";
const PlayerListCard = ({data}) => {
const {t} = useTranslation();
@ -13,7 +14,9 @@ const PlayerListCard = ({data}) => {
useEffect(() => {
if (!data) return;
for (const row of data.data) {
row.name = row.name.replace('../player/', '../../player/');
row.name = row.name
.replace('../player/', baseAddress + '/player/')
.replace('./player/', baseAddress + '/player/');
}
setOptions({