chore: remove to-from input handling functions

This commit is contained in:
TzeYiing authored and Copple committed 2022-03-30 17:07:40 +02:00
1 parent 2c9caeaba7
commit 5bab40b2cb
1 file changed
-19
@@ -112,25 +112,6 @@ const PreviewFilterPanel: FC<Props> = ({
</Button>
)
const handleToChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const value = e.target.value
console.log('value', value)
if (value !== '' && isNaN(Date.parse(value))) {
setTo({ value, error: 'Invalid ISO 8601 timestamp' })
} else {
setTo({ value, error: '' })
}
}
const handleFromChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const value = e.target.value
if (value !== '' && isNaN(Date.parse(value))) {
setFrom({ value, error: 'Invalid ISO 8601 timestamp' })
} else {
setFrom({ value, error: '' })
}
}
const handleSearch = () => onSearch({ query: search, to: to.value, from: from.value })
return (