From 59f4a632f3dd59c74bb4bcbc109a3715d4b3ae00 Mon Sep 17 00:00:00 2001 From: NikiTaysRD Date: Fri, 10 Jan 2025 17:44:30 +0200 Subject: [PATCH 1/2] feat: refactoring --- src/components/pages/game/game.tsx | 23 +++++++++++++---------- src/components/ui/button.tsx | 1 + 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/components/pages/game/game.tsx b/src/components/pages/game/game.tsx index 6d05ef6..9babe04 100644 --- a/src/components/pages/game/game.tsx +++ b/src/components/pages/game/game.tsx @@ -6,6 +6,7 @@ import { toast } from 'react-toastify'; import { z } from 'zod'; import Solana from '@/components/common/Svg/Solana.tsx'; +import { Button } from '@/components/ui/button.tsx'; import useMakePrediction from '@/hooks/contracts/write/use-make-prediction'; import useSendSol from '@/hooks/contracts/write/use-send-sol'; import { cn } from '@/lib/utils'; @@ -67,8 +68,8 @@ export const GameSection = () => { }, [isSuccess, predictionAnswer, setValue, watch]); return ( -
-
Your Future In One Bet
+
+
Your Future In One Bet
{predictionAnswer && ( @@ -83,9 +84,9 @@ export const GameSection = () => {
Type your question and ask the cards
- +
@@ -132,29 +133,31 @@ export const GameSection = () => {
{[0.002, 0.004, 0.02, 0.5].map((tip) => ( -
{ setSelectedTip(selectedTip === tip ? 0 : tip); }} className={cn( selectedTip === tip ? '!bg-[#9DA990]' : '', - 'flex w-full items-center justify-center rounded-[8px] border border-[#3A3939] bg-[#D0C7A3] p-[14px] font-poppins text-[20px]', + 'bg-[#D0C7A3] text-[20px]', 'cursor-pointer select-none', )} > {tip} -
+ ))}
- +
); diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index 8ce6212..95fa990 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -14,6 +14,7 @@ const buttonVariants = cva( secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80', }, size: { + responsive: 'px-4 py-2', default: 'h-10 px-4 py-2', sm: 'h-9 rounded-md px-3', lg: 'h-11 rounded-md px-8', From 9016c471abd22cc7c78cc62f16307817efd88d88 Mon Sep 17 00:00:00 2001 From: NikiTaysRD Date: Fri, 10 Jan 2025 17:47:42 +0200 Subject: [PATCH 2/2] feat: refactoring --- src/components/pages/game/game.tsx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/components/pages/game/game.tsx b/src/components/pages/game/game.tsx index 9babe04..9bd7ed1 100644 --- a/src/components/pages/game/game.tsx +++ b/src/components/pages/game/game.tsx @@ -107,22 +107,26 @@ export const GameSection = () => { {publicKey ? ( - + ) : ( - + )} @@ -134,13 +138,15 @@ export const GameSection = () => { {[0.002, 0.004, 0.02, 0.5].map((tip) => (