fix(frontend): new radarr/sonarr ports will be converted to a number before posting

pull/238/head
sct 4 years ago
parent 5f09e83ed8
commit 92c9001c9d

@ -63,9 +63,7 @@ const Modal: React.FC<ModalProps> = ({
});
useLockBodyScroll(true, disableScrollLock);
return (
<>
{ReactDOM.createPortal(
return ReactDOM.createPortal(
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
<div
className="fixed top-0 left-0 right-0 bottom-0 bg-gray-800 bg-opacity-50 w-full h-full z-50 flex justify-center items-center"
@ -181,8 +179,6 @@ const Modal: React.FC<ModalProps> = ({
</Transition>
</div>,
document.body
)}
</>
);
};

@ -108,7 +108,7 @@ const RadarrModal: React.FC<RadarrModalProps> = ({
{
hostname,
apiKey,
port,
port: Number(port),
baseUrl,
useSsl,
}

@ -111,7 +111,7 @@ const SonarrModal: React.FC<SonarrModalProps> = ({
{
hostname,
apiKey,
port,
port: Number(port),
baseUrl,
useSsl,
}

@ -15,7 +15,7 @@ const useClickOutside = (
): void => {
useEffect(() => {
const handleBodyClick = (e: MouseEvent) => {
if (!ref.current?.contains(e.target as Node)) {
if (ref.current && !ref.current.contains(e.target as Node)) {
callback(e);
}
};

Loading…
Cancel
Save