aboutsummaryrefslogtreecommitdiff
path: root/pages/user.tsx
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-03-14 15:07:51 +0100
committerlonkaars <l.leblansch@gmail.com>2021-03-14 15:07:51 +0100
commit8a9060d5dcdc67d14fb5b1b6e856d9ea39ffb618 (patch)
treeeeaf0178fdc2e90e85f3f0f89d4272618ab0f4db /pages/user.tsx
parentf6e46892723059efe3ad7666f94d476c7d350c2c (diff)
friend count + dutch grammar on /user
Diffstat (limited to 'pages/user.tsx')
-rw-r--r--pages/user.tsx12
1 files changed, 10 insertions, 2 deletions
diff --git a/pages/user.tsx b/pages/user.tsx
index c963550..01a2d23 100644
--- a/pages/user.tsx
+++ b/pages/user.tsx
@@ -290,7 +290,11 @@ export default function AccountPage() {
return memberSince;
})() }/>
- <InfoModule icon={<PeopleOutlineOutlinedIcon/>} label="2 vrienden"/>
+ <InfoModule icon={<PeopleOutlineOutlinedIcon/>} label={(() => {
+ var label = user?.friends.toString() + " ";
+ label += user?.friends == 1 ? "vriend" : "vrienden";
+ return label;
+ })()}/>
<InfoModule icon={<Icon size={1} path={mdiEarth}/>} label="Nederland"/>
</InfoSection>
<InfoSection>
@@ -298,7 +302,11 @@ export default function AccountPage() {
<InfoModule icon={<Icon size={1} path={mdiEqual}/>} label={ gameInfo?.totals.draw + " keer gelijkspel" }/>
<InfoModule icon={<ArrowDownwardOutlinedIcon style={{ color: "var(--disk-a-text)" }}/>} label={ gameInfo?.totals.lose + " keer verloren" }/>
<InfoModule icon={<Icon size={1} path={mdiClipboardTextOutline}/>} label="Score: 400"/>
- <InfoModule icon={<Icon size={1} path={mdiGamepadSquareOutline}/>} label={ gameInfo?.totals.games + " potjes" }/>
+ <InfoModule icon={<Icon size={1} path={mdiGamepadSquareOutline}/>} label={(() => {
+ var label = gameInfo?.totals.games.toString() + " ";
+ label += gameInfo?.totals.games == 1 ? "potje" : "potjes";
+ return label;
+ })()}/>
</InfoSection>
<Vierkant>
<RecentGames games={gameInfo?.games}/>