Sigma-Web-Dev-Course icon indicating copy to clipboard operation
Sigma-Web-Dev-Course copied to clipboard

video 137 - BitTree

Open abhinavgautam01 opened this issue 1 year ago • 0 comments

after creating Bit Tree - by clicking on the button we have cleared the input texts as:

if(result.success){ 
     toast.success(result.message)
     setLinks([])
     setpic("")
     sethandle("")
    }
    else{
      toast.error(result.message)
    }

It will show error, if we try to input handle again

So it should be done in this way:

if(result.success){ 
     toast.success(result.message)
     setLinks([{link:"", linktext:""}])
     setpic("")
     sethandle("")
     setdesc("")
    }
    else{
      toast.error(result.message)
    }

it will remove the error and make the code little better..! @CodeWithHarry @it-is-Aman

abhinavgautam01 avatar Dec 07 '24 13:12 abhinavgautam01