diff --git a/package.json b/package.json index cb7db40..3aedf0e 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,8 @@ "preview": "vite preview" }, "dependencies": { + "@fontsource/bona-nova-sc": "^5.1.1", + "@fontsource/poppins": "^5.1.1", "@hookform/resolvers": "^3.10.0", "@radix-ui/react-accordion": "^1.2.2", "@radix-ui/react-dialog": "^1.1.4", diff --git a/public/images/tarot-game/bord.png b/public/images/tarot-game/bord.png new file mode 100644 index 0000000..7da1d32 Binary files /dev/null and b/public/images/tarot-game/bord.png differ diff --git a/src/App.tsx b/src/App.tsx index 9eaf7b9..46daa90 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -6,6 +6,10 @@ import { QueryProvider } from '@/providers/query-provider'; import { RouterProvider } from '@/providers/router-provider'; import { SolanaProvider } from '@/providers/solana-provider'; +import '@fontsource/bona-nova-sc/400.css'; +import '@fontsource/bona-nova-sc/700.css'; +import '@fontsource/poppins/400.css'; + function App() { return ( diff --git a/src/components/common/Svg/Solana.tsx b/src/components/common/Svg/Solana.tsx new file mode 100644 index 0000000..bffd79d --- /dev/null +++ b/src/components/common/Svg/Solana.tsx @@ -0,0 +1,54 @@ +const Solana = () => ( + + + + + + + + + + + + + + + + + + + + +); + +export default Solana; diff --git a/src/components/pages/game/game.tsx b/src/components/pages/game/game.tsx index 0fc0aee..7ff8b0d 100644 --- a/src/components/pages/game/game.tsx +++ b/src/components/pages/game/game.tsx @@ -2,13 +2,12 @@ import { zodResolver } from '@hookform/resolvers/zod'; import { useWallet } from '@solana/wallet-adapter-react'; import { useEffect } from 'react'; import { SubmitHandler, useForm } from 'react-hook-form'; -import { toast } from 'react-toastify'; + import { z } from 'zod'; -import { ConnectWalletButton } from '@/components/common/Header/connect-wallet-button'; -import { Button } from '@/components/ui/button'; -import { Input } from '@/components/ui/input'; import useMakePrediction from '@/hooks/contracts/write/use-make-prediction'; +import Solana from '@/components/common/Svg/Solana.tsx'; +import { useWalletModalStore } from '@/store/wallet-modal.tsx'; const TarotRequestSchema = z.object({ question: z @@ -23,15 +22,12 @@ type TarotRequestSchemaType = z.infer; export const GameSection = () => { const { publicKey } = useWallet(); + const { setIsOpen } = useWalletModalStore(); const { mutateAsync: transfer, isSuccess, isPending, data: predictionAnswer } = useMakePrediction(); - const { - register, - handleSubmit, - watch, - setValue, - formState: { errors }, - } = useForm({ resolver: zodResolver(TarotRequestSchema) }); + const { register, handleSubmit, watch, setValue } = useForm({ + resolver: zodResolver(TarotRequestSchema), + }); const onSubmit: SubmitHandler = async (data, e) => { e?.preventDefault(); @@ -46,44 +42,45 @@ export const GameSection = () => { }, [isSuccess, predictionAnswer, setValue, watch]); return ( -
-

Game Page

-
- {errors.question.message}} - > -