Skip to content

Commit

Permalink
address
Browse files Browse the repository at this point in the history
  • Loading branch information
polymorpher committed Oct 20, 2024
1 parent 5430e9b commit 4668116
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/launch.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useRef } from 'react'
import React, { useState, useRef, useEffect } from 'react'
import {
Box,
VStack,
Expand Down Expand Up @@ -30,6 +30,7 @@ import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { chainOptions, type ChainOptionType } from './utils'
import { ConnectButton } from '@rainbow-me/rainbowkit'
import { useAccount } from 'wagmi'

const client = createPublicClient({
chain: mainnet,
Expand All @@ -47,6 +48,7 @@ interface RecipeResponse {
}

const Launch = (): React.JSX.Element => {
const { address, chainId } = useAccount()
const [prompt, setPrompt] = useState('')
const [urlPath, setUrlPath] = useState('')
const [recipe, setRecipe] = useState('')
Expand Down Expand Up @@ -74,6 +76,10 @@ const Launch = (): React.JSX.Element => {
const [hasDeployedToHarmony, setHasDeployedToHamony] = useState(false)
const [hasDeployedToPolygon, setHasDeployedToPolygon] = useState(false)

useEffect(() => {
setIsWalletConnected(!!address)
}, [address])

const generateRecipe = async (prompt: string): Promise<void> => {
setIsRecipeLoading(true)
try {
Expand Down

0 comments on commit 4668116

Please sign in to comment.