Skip to content

Commit

Permalink
fix: remove use effect (#501)
Browse files Browse the repository at this point in the history
  • Loading branch information
Melisa Anabella Rossi authored Jan 23, 2024
1 parent 610f9d7 commit 0bc97d7
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/components/AddressField/AddressField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,12 @@ export default function AddressField(props: Props) {
onChange,
...otherProps
} = props
const [inputValue, setInputValue] = useState('')
const [inputValue, setInputValue] = useState(props.value || '')
const [address, setAddress] = useState('')
const timeout = useRef<NodeJS.Timeout>()
const [valid, setValid] = useState<boolean>()
const [loading, setLoading] = useState<boolean>()

useEffect(() => {
if (props.value && props.value !== address) {
setInputValue(props.value)
}
}, [props.value, address])

useEffect(() => {
return () => {
clearTimeout(timeout.current)
Expand Down

1 comment on commit 0bc97d7

@vercel
Copy link

@vercel vercel bot commented on 0bc97d7 Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

decentraland-ui – ./

decentraland-ui-decentraland1.vercel.app
decentraland-ui-git-master-decentraland1.vercel.app

Please sign in to comment.