diff options
-rw-r--r-- | api/api.ts | 20 | ||||
-rw-r--r-- | pages/index.tsx | 2 | ||||
-rw-r--r-- | pages/user.tsx | 2 |
3 files changed, 12 insertions, 12 deletions
@@ -1,21 +1,21 @@ export interface userInfo { - avatar?: string|null, - status?: string|null, - coutry?: string|null, - id?: string, - registered?: number, - type?: string, - username?: string, + avatar: string|null, + status: string|null, + coutry: string|null, + id: string, + registered: number, + username: string, friends: number, relation?: "none"|"friends"|"incoming"|"outgoing"|"blocked", + rating: number, }; export type ruleset = { timelimit: { enabled: boolean; - minutes?: number; - seconds?: number; - addmove?: number; + minutes: number; + seconds: number; + addmove: number; shared: boolean; }, ranked: boolean; diff --git a/pages/index.tsx b/pages/index.tsx index 71a83d3..266a3f4 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -104,7 +104,7 @@ function AccountBox(props: { overflow: "hidden", textOverflow: "ellipsis", }}>{props.info?.username}</h2> - <p style={{ marginTop: 6 }}>Score: 400</p> + <p style={{ marginTop: 6 }}>Score: {props.info?.rating}</p> <p style={{ position: "absolute", bottom: 0, left: 0 }}> <span style={{ color: "var(--disk-b-text)" }}>{props.sumGameInfo?.win} W</span> <span style={{ margin: "0 3px" }}>/</span> diff --git a/pages/user.tsx b/pages/user.tsx index ac6f012..a79e353 100644 --- a/pages/user.tsx +++ b/pages/user.tsx @@ -286,7 +286,7 @@ export default function AccountPage() { <InfoModule icon={<ArrowUpwardOutlinedIcon style={{ color: "var(--disk-b-text)" }}/>} label={ gameInfo?.totals.win + " keer gewonnen" }/> <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={mdiClipboardTextOutline}/>} label={ "Score: " + user?.rating }/> <InfoModule icon={<Icon size={1} path={mdiGamepadSquareOutline}/>} label={(() => { var label = gameInfo?.totals.games.toString() + " "; label += gameInfo?.totals.games == 1 ? "potje" : "potjes"; |