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) => { ...@@ -316,7 +316,7 @@ const CompetitionManager: React.FC = (props: any) => {
<TableBody> <TableBody>
{competitions && {competitions &&
competitions.map((row) => ( competitions.map((row) => (
<TableRow key={row.name}> <TableRow key={row.id}>
<TableCell scope="row"> <TableCell scope="row">
<Button color="primary" component={Link} to={`/editor/competition-id=${row.id}`}> <Button color="primary" component={Link} to={`/editor/competition-id=${row.id}`}>
{row.name} {row.name}
......
...@@ -81,7 +81,7 @@ const RegionManager: React.FC = (props: any) => { ...@@ -81,7 +81,7 @@ const RegionManager: React.FC = (props: any) => {
<TableBody> <TableBody>
{cities && {cities &&
cities.map((row) => ( cities.map((row) => (
<TableRow key={row.name}> <TableRow key={row.id}>
<TableCell scope="row">{row.name}</TableCell> <TableCell scope="row">{row.name}</TableCell>
<TableCell align="right"> <TableCell align="right">
<Button onClick={(event) => handleClick(event, row.id)} data-testid={row.name}> <Button onClick={(event) => handleClick(event, row.id)} data-testid={row.name}>
......
...@@ -152,7 +152,7 @@ const UserManager: React.FC = (props: any) => { ...@@ -152,7 +152,7 @@ const UserManager: React.FC = (props: any) => {
<TableBody> <TableBody>
{users && {users &&
users.map((row) => ( users.map((row) => (
<TableRow key={row.email}> <TableRow key={row.id}>
<TableCell scope="row">{row.email}</TableCell> <TableCell scope="row">{row.email}</TableCell>
<TableCell scope="row">{row.name}</TableCell> <TableCell scope="row">{row.name}</TableCell>
<TableCell>{cities.find((city) => city.id === row.city_id)?.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