Skip to content

Commit

Permalink
Merge pull request #447 from whtsupbab3/207-prompt-connect-wallet
Browse files Browse the repository at this point in the history
 feat: issue #207
  • Loading branch information
picsoritdidnthappen authored Jan 5, 2025
2 parents 26cc5ba + 2f764cf commit 563fe93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/components/ui/CreateBounty.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { useAccount } from 'wagmi';
import FormBounty from '@/components/global/FormBounty';
import GameButton from '@/components/global/GameButton';
import ButtonCTA from '@/components/ui/ButtonCTA';
import { toast } from 'react-toastify';
import { useConnectModal } from '@rainbow-me/rainbowkit';

export default function CreateBounty() {
const { openConnectModal } = useConnectModal();
const [showForm, setShowForm] = useState(false);
const account = useAccount();

Expand All @@ -19,7 +20,7 @@ export default function CreateBounty() {
setShowForm(true);
return;
}
toast.error('Please connect your wallet');
openConnectModal?.();
}}
>
<GameButton />
Expand Down
5 changes: 3 additions & 2 deletions src/components/ui/CreateClaim.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import { useAccount } from 'wagmi';
import GameButton from '@/components/global/GameButton';
import ButtonCTA from '@/components/ui/ButtonCTA';
import FormClaim from '@/components/global/FormClaim';
import { toast } from 'react-toastify';
import { useGetChain } from '@/hooks/useGetChain';
import { trpc } from '@/trpc/client';
import { useConnectModal } from '@rainbow-me/rainbowkit';

export default function CreateClaim({ bountyId }: { bountyId: string }) {
const chain = useGetChain();
const [showForm, setShowForm] = useState(false);
const account = useAccount();
const { openConnectModal } = useConnectModal();

const bounty = trpc.bounty.useQuery({
id: Number(bountyId),
Expand All @@ -31,7 +32,7 @@ export default function CreateClaim({ bountyId }: { bountyId: string }) {
setShowForm(true);
return;
}
toast.error('Please connect your wallet');
openConnectModal?.();
}}
>
<GameButton />
Expand Down

0 comments on commit 563fe93

Please sign in to comment.