From 2b34bf8f0b32f97def340f23c0a9b82d5102c54b Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Wed, 17 May 2023 17:48:37 +0100 Subject: [PATCH] Styled the history timeline a bit better --- src/pages/history.tsx | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/src/pages/history.tsx b/src/pages/history.tsx index fa1e4249..d8ae5a92 100644 --- a/src/pages/history.tsx +++ b/src/pages/history.tsx @@ -22,6 +22,8 @@ import {Module} from "@/interfaces"; import axios from "axios"; import {toast} from "react-toastify"; import {useRouter} from "next/router"; +import Icon from "@mdi/react"; +import {mdiArrowRight, mdiChevronRight} from "@mdi/js"; export const getServerSideProps = withIronSessionSsr(({req, res}) => { const user = req.session.user; @@ -116,20 +118,23 @@ export default function History({user}: {user: User}) { return (
{formatTimestamp(timestamp)} -
- - Modules:{" "} - {formatModuleTotalStats(dateStats) - .filter((x) => x.value > 0) - .map((x) => x.label) - .join(", ")} - - - Score: {correct}/{total} | {((correct / total) * 100).toFixed(2)}% - - +
+
+ + Modules:{" "} + {formatModuleTotalStats(dateStats) + .filter((x) => x.value > 0) + .map((x) => x.label) + .join(", ")} + + + Score: {correct}/{total} | {((correct / total) * 100).toFixed(2)}% + +
+
); @@ -154,7 +159,9 @@ export default function History({user}: {user: User}) { )}
- {groupedStats && !isStatsLoading && } + {groupedStats && !isStatsLoading && ( + parseInt(b) - parseInt(a))} content={customContent} /> + )}