From 57363db5bce014b2462a176f1426e055b578630d Mon Sep 17 00:00:00 2001
From: zkldi <20380519+zkldi@users.noreply.github.com>
Date: Wed, 17 Aug 2022 15:17:03 +0100
Subject: [PATCH 1/3] feat: ugpt overview show raises, improve raises ui on
mobile
---
.../games/_game/_playtype/OverviewPage.tsx | 152 +++++++++---------
.../components/sessions/SessionOverview.tsx | 2 +-
.../sessions/SessionRaiseBreakdown.tsx | 4 +-
3 files changed, 77 insertions(+), 81 deletions(-)
diff --git a/client/src/app/pages/dashboard/users/games/_game/_playtype/OverviewPage.tsx b/client/src/app/pages/dashboard/users/games/_game/_playtype/OverviewPage.tsx
index 0ff734736..461835099 100644
--- a/client/src/app/pages/dashboard/users/games/_game/_playtype/OverviewPage.tsx
+++ b/client/src/app/pages/dashboard/users/games/_game/_playtype/OverviewPage.tsx
@@ -18,7 +18,7 @@ import SelectButton from "components/util/SelectButton";
import { useProfileRatingAlg } from "components/util/useScoreRatingAlg";
import { DateTime } from "luxon";
import React, { useMemo, useState } from "react";
-import { Badge } from "react-bootstrap";
+import { Badge, Row } from "react-bootstrap";
import {
FormatGame,
GetGameConfig,
@@ -31,6 +31,7 @@ import {
import { SessionReturns, UGPTHistory } from "types/api-returns";
import { GamePT } from "types/react";
import { ScoreDataset } from "types/tables";
+import SessionRaiseBreakdown from "components/sessions/SessionRaiseBreakdown";
export default function OverviewPage({
reqUser,
@@ -84,81 +85,76 @@ function LastSession({ reqUser, game, playtype }: { reqUser: PublicUserDocument
data && (
- {
- <>
-
-
{data.session.name}
- {data.session.desc}
-
-
+
+
{data.session.name}
+ {data.session.desc}
+
+
-
-
-
-
Started
-
{FormatTime(data.session.timeStarted)}
-
-
- {/* If session ended less than 2 hours ago, it can still be appended to. */}
- {/* Kinda - time is a bit nonlinear wrt. importing scores, as scores don't have to have */}
- {/* happened at the same time they were imported. */}
- {/* that doesn't matter though - this is just a UI thing */}
-
- {FormatTime(data.session.timeEnded)}
- {/* if the last score was less than 10 mins ago, this session is probably still being populated */}
- {Date.now() - data.session.timeEnded <
- ONE_MINUTE * 10 && (
- <>
-
-
- Ongoing!
-
- >
- )}
-
+ {/* If session ended less than 2 hours ago, it can still be appended to. */}
+ {/* Kinda - time is a bit nonlinear wrt. importing scores, as scores don't have to have */}
+ {/* happened at the same time they were imported. */}
+ {/* that doesn't matter though - this is just a UI thing */}
+
+ {FormatTime(data.session.timeEnded)}
+ {/* if the last score was less than 10 mins ago, this session is probably still being populated */}
+ {Date.now() - data.session.timeEnded <
+ ONE_MINUTE * 10 && (
+ <>
+
+
+ Ongoing!
+
+ >
+ )}
+