Skip to content

Commit

Permalink
Merge pull request #12 from RedDuck-Software/fix/eslint-errors
Browse files Browse the repository at this point in the history
Fix/eslint errors
  • Loading branch information
NikiTaysRD authored Jan 10, 2025
2 parents 9f97cbb + cd686e4 commit 1705580
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/static-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '20'
- run: corepack enable
- uses: actions/cache@v3
id: cache
with:
Expand Down
11 changes: 6 additions & 5 deletions src/components/pages/game/game.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ 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 { z } from 'zod';

import useMakePrediction from '@/hooks/contracts/write/use-make-prediction';
import Solana from '@/components/common/Svg/Solana.tsx';
import useMakePrediction from '@/hooks/contracts/write/use-make-prediction';
import { useWalletModalStore } from '@/store/wallet-modal.tsx';

const TarotRequestSchema = z.object({
Expand Down Expand Up @@ -42,8 +41,8 @@ export const GameSection = () => {
}, [isSuccess, predictionAnswer, setValue, watch]);

return (
<div className="font-inknut container flex flex-col gap-[20px] py-[20px]">
<div className="font-bona-nova-sc text-center text-[50px]">Your Future In One Bet</div>
<div className="container flex flex-col gap-[20px] py-[20px] font-inknut">
<div className="text-center font-bona-nova-sc text-[50px]">Your Future In One Bet</div>
<div>
<img src="images/tarot-game/bord.png" alt="bord" />
</div>
Expand Down Expand Up @@ -75,7 +74,9 @@ export const GameSection = () => {
</button>
) : (
<button
onClick={() => setIsOpen(true)}
onClick={() => {
setIsOpen(true);
}}
className="rounded-[8px] border border-[#3A3939] bg-[#9DA990] text-[22px] text-[#4F5548]"
>
Connect Wallet
Expand Down
4 changes: 2 additions & 2 deletions src/components/ui/accordion.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use client';

import * as React from 'react';
import * as AccordionPrimitive from '@radix-ui/react-accordion';
import { ChevronDown } from 'lucide-react';
import * as React from 'react';

import { cn } from '@/lib/utils';

Expand Down Expand Up @@ -47,7 +47,7 @@ const AccordionContent = React.forwardRef<
>(({ className, children, ...props }, ref) => (
<AccordionPrimitive.Content
ref={ref}
className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden px-2 text-[20px]"
className="overflow-hidden px-2 text-[20px] data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
{...props}
>
<div className={cn('pb-4 pt-0', className)}>{children}</div>
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/contracts/write/use-make-prediction.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { useWallet } from '@solana/wallet-adapter-react';
import { SystemProgram, Transaction } from '@solana/web3.js';
import { useMutation } from '@tanstack/react-query';
import { toast } from 'react-toastify';

import { OwnerAddress } from '@/constants/addresses';
import { env } from '@/env';
import useSubmitTarotCards from '@/hooks/api/use-submit-cards';
import { network } from '@/lib/solana';
import { sendAndConfirmTransaction } from '@/lib/solana/utils';
import { getRandomTarotCards } from '@/lib/utils';
import { toast } from 'react-toastify';

let toastId: string | number | null = null;

Expand Down Expand Up @@ -64,7 +64,7 @@ const useMakePrediction = () => {

updateToast();

return result?.response || '';
return result?.response ?? '';
},

onError(error) {
Expand Down

0 comments on commit 1705580

Please sign in to comment.