From ec0c44807a2b4d7575bbc0d35a8e46533aa38a64 Mon Sep 17 00:00:00 2001 From: Kevin Thomas Date: Sat, 2 Nov 2024 00:28:38 -0700 Subject: [PATCH] chore: migrated TuringSubmission to tailwindcss & changed toggle functionality --- .../TuringSubmission/TuringSubmission.tsx | 115 +++++++++--------- src/styles/tailwind.css | 24 ++-- 2 files changed, 69 insertions(+), 70 deletions(-) diff --git a/src/components/TuringSubmission/TuringSubmission.tsx b/src/components/TuringSubmission/TuringSubmission.tsx index 0fa6608..0dd7306 100644 --- a/src/components/TuringSubmission/TuringSubmission.tsx +++ b/src/components/TuringSubmission/TuringSubmission.tsx @@ -1,7 +1,7 @@ -import classNames from 'classnames' +import { motion } from 'framer-motion' import { useCallback, useContext, useEffect, useState } from 'react' + import { TuringControllerContext } from 'src/contexts' -import styles from './TuringSubmission.module.scss' export const TuringSubmission: React.FC = () => { const { game, submitGuess, getNewGame, commentController } = useContext( @@ -22,102 +22,101 @@ export const TuringSubmission: React.FC = () => { if (game?.result) return ( -
-

+
+

Guess {game.result.correct ? 'correct' : 'incorrect'},
{game.result.bot} was the bot

-
+

{game.result.timeControl} ยท {game.result.gameType}

-
-

โ—

+
+

โ—

{game.result.whitePlayer.title && ( - - {game.result.whitePlayer.title} - + {game.result.whitePlayer.title} )} {game.result.whitePlayer.name} ({game.result.whitePlayer.rating}) {game.result.bot === 'white' ? '๐Ÿค–' : undefined}
-
-

โ—‹

+
+

โ—‹

{game.result.blackPlayer.title && ( - - {game.result.blackPlayer.title} - + {game.result.blackPlayer.title} )} {game.result.blackPlayer.name} ({game.result.blackPlayer.rating}){' '} {game.result.bot === 'black' ? '๐Ÿค–' : undefined}
- +
) return ( -
-
-

Who is the bot?

-
+
+
+

Who is the bot?

+
-
- setSelected('white')} - /> - - setSelected('black')} +
+ -
-