Skip to content
Snippets Groups Projects
Commit fa9bfb9c authored by Albin Henriksson's avatar Albin Henriksson
Browse files

fix duplicate keys in tables

parent a87a0dec
No related branches found
No related tags found
No related merge requests found
Pipeline #46483 passed with warnings
......@@ -316,7 +316,7 @@ const CompetitionManager: React.FC = (props: any) => {
<TableBody>
{competitions &&
competitions.map((row) => (
<TableRow key={row.name}>
<TableRow key={row.id}>
<TableCell scope="row">
<Button color="primary" component={Link} to={`/editor/competition-id=${row.id}`}>
{row.name}
......
......@@ -81,7 +81,7 @@ const RegionManager: React.FC = (props: any) => {
<TableBody>
{cities &&
cities.map((row) => (
<TableRow key={row.name}>
<TableRow key={row.id}>
<TableCell scope="row">{row.name}</TableCell>
<TableCell align="right">
<Button onClick={(event) => handleClick(event, row.id)} data-testid={row.name}>
......
......@@ -152,7 +152,7 @@ const UserManager: React.FC = (props: any) => {
<TableBody>
{users &&
users.map((row) => (
<TableRow key={row.email}>
<TableRow key={row.id}>
<TableCell scope="row">{row.email}</TableCell>
<TableCell scope="row">{row.name}</TableCell>
<TableCell>{cities.find((city) => city.id === row.city_id)?.name || ''}</TableCell>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment