From 21d7703c679c85929abea1ac01ef22a83ebf4404 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Thu, 11 Mar 2021 16:15:38 +0100 Subject: readme update + recent games empty case --- components/recentGames.tsx | 50 +++++++++++++++++++++++++++------------------- readme.md | 7 ++++++- 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/components/recentGames.tsx b/components/recentGames.tsx index 92855a1..a37f662 100644 --- a/components/recentGames.tsx +++ b/components/recentGames.tsx @@ -41,27 +41,35 @@ function GameOutcome(props: { game: gameInfo }) { export default function RecentGames(props: { games?: Array }) { return

Recente partijen

- - - - - - - - - { - props.games?.map(game => - - - - - ) - } - -
TegenstanderUitkomstZettenDatum
{game.opponent?.username}{Math.max(0, game.moves.length -1)}{(() => { - var timeCreated = new Date(game.created); - return friendlyTime(timeCreated); - })()}
+ { + props.games?.length > 0 ? + + + + + + + + + { + props.games?.map(game => + + + + + ) + } + +
TegenstanderUitkomstZettenDatum
{game.opponent?.username}{Math.max(0, game.moves.length -1)}{(() => { + var timeCreated = new Date(game.created); + return friendlyTime(timeCreated); + })()}
: +

Deze gebruiker heeft nog geen partijen gespeeld

+ }
} diff --git a/readme.md b/readme.md index 8614305..ccc6f5d 100644 --- a/readme.md +++ b/readme.md @@ -4,7 +4,12 @@ ## This is a school project using Python and SQL -Some of this project's code is in Dutch (commit messages, documents etc.), along with the whole website. I'm planning on adding some form of localization system, and I'll try to maintain this after the assignment deadline because I think this is a pretty cool project. I'll also be fixing issues/merging pr's after the deadline. I think the deadline is ~January 25th~ sometime in March? though I'm not sure about this. +Some of this project's code is in Dutch (commit messages, documents etc.), +along with the whole website. I'm planning on adding some form of localization +system, and I'll try to maintain this after the assignment deadline because I +think this is a pretty cool project. I'll also be fixing issues/merging pr's +after the deadline. ~I think the deadline is January 25th sometime in March? +though I'm not sure about this.~ The deadline is March 19th. ## Things that we'd like to have working: -- cgit v1.2.3