Always show endpoint apply (w/ isDisabled) (#3321)

This commit is contained in:
Jaco Greeff 2020-08-02 13:54:31 +02:00 committed by GitHub
parent 7004fd03fa
commit 7446907d45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,15 +122,12 @@ function Endpoints ({ className = '', offset, onClose }: Props): React.ReactElem
return (
<Sidebar
button={
(hasUrlChanged && isUrlValid)
? (
<Button
icon='sync'
label={t<string>('Switch')}
onClick={_onApply}
/>
)
: undefined
<Button
icon='sync'
isDisabled={!(hasUrlChanged && isUrlValid)}
label={t<string>('Switch')}
onClick={_onApply}
/>
}
className={className}
offset={offset}