Sigma-Web-Dev-Course
Sigma-Web-Dev-Course copied to clipboard
video 137 - BitTree
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