diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-03-12 10:30:39 +0100 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-03-12 10:30:39 +0100 |
commit | 73070f63128ef178bb15f64ebaf1c770cc40e5ce (patch) | |
tree | 4adfb1be4b2e4bc8bdd8131f4d001cf925b635ba | |
parent | 6a0411142a381389adc0d7151a76fbbb33a81fa2 (diff) |
api error fix + recent games link to user
-rw-r--r-- | api/user/preferences.py | 2 | ||||
-rw-r--r-- | components/recentGames.tsx | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/api/user/preferences.py b/api/user/preferences.py index bfbfe66..6c8a6f3 100644 --- a/api/user/preferences.py +++ b/api/user/preferences.py @@ -1,5 +1,5 @@ from flask import Blueprint, request -from db import cursor +from db import cursor, connection from auth.login_token import token_login import json diff --git a/components/recentGames.tsx b/components/recentGames.tsx index a37f662..4eaed91 100644 --- a/components/recentGames.tsx +++ b/components/recentGames.tsx @@ -53,7 +53,12 @@ export default function RecentGames(props: { games?: Array<gameInfo> }) { </tr> { props.games?.map(game => <tr> - <td style={LeftAlignedTableColumn}>{game.opponent?.username}</td> + <td style={LeftAlignedTableColumn}> + <a href={"/user?id=" + game.opponent?.id} style={{ + textDecoration: "none", + fontWeight: 500 + }}>{game.opponent?.username}</a> + </td> <GameOutcome game={game}/> <td>{Math.max(0, game.moves.length -1)}</td> <td style={RightAlignedTableColumn}>{(() => { |