From e30093cd57b6827b70f3e6a68dec57e9330e8ee6 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 18 Jan 2022 23:24:22 +0100 Subject: [PATCH] Part 1 of dialog OK need histogram --- src/components/modals/StatsModal.tsx | 53 ++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/src/components/modals/StatsModal.tsx b/src/components/modals/StatsModal.tsx index b0c2e50..6f66276 100644 --- a/src/components/modals/StatsModal.tsx +++ b/src/components/modals/StatsModal.tsx @@ -3,6 +3,10 @@ import { Dialog, Transition } from '@headlessui/react' import { XCircleIcon } from '@heroicons/react/outline' import { trys, successRate, currentStreak, bestStreak } from '../../lib/stats' +//const boxItem = ( label: string, value: string ) => { +// return () +// } + type Props = { isOpen: boolean handleClose: () => void @@ -63,23 +67,50 @@ export const StatsModal = ({ isOpen, handleClose, stats }: Props) => { > Statistics -
-

trys = {String(trys(stats))}

-

success rate = {String(successRate(stats))}%

-

Best streak is {String(bestStreak(stats))} currently {String(currentStreak(stats))}

+
+
+
{String(trys(stats))}
+
Total trys
+
+
+
{String(successRate(stats))}%
+
Success rate
+
+
+
{String(currentStreak(stats))}
+
Current streak
+
+
+
{String(bestStreak(stats))}
+
Best streak
+
- Distribution + Guess Distribution -

1 {String(stats[0])}

-

2 {String(stats[1])}

-

3 {String(stats[2])}

-

4 {String(stats[3])}

-

5 {String(stats[4])}

-

6 {String(stats[5])}

+
+
+
1 {String(stats[0])}
+
+
+
2 {String(stats[1])}
+
+
+
3 {String(stats[2])}
+
+
+
4 {String(stats[3])}
+
+
+
5 {String(stats[4])}
+
+
+
6 {String(stats[5])}
+
+