fix(frontend): properly remove site overlay when closing modals

pull/228/head
sct 4 years ago
parent b16fbafa1f
commit 3fa7ff9858

@ -84,7 +84,6 @@ const Modal: React.FC<ModalProps> = ({
leave="transition opacity-100 duration-300"
leaveFrom="opacity-100"
leaveTo="opacity-0"
appear
show={loading}
>
<div style={{ position: 'absolute' }}>
@ -98,7 +97,6 @@ const Modal: React.FC<ModalProps> = ({
leave="transition opacity-100 duration-300"
leaveFrom="opacity-100"
leaveTo="opacity-0"
appear
show={!loading}
>
<div

@ -43,7 +43,6 @@ const MovieRequestModal: React.FC<RequestModalProps> = ({
onComplete,
tmdbId,
onUpdating,
...props
}) => {
const [isUpdating, setIsUpdating] = useState(false);
const { addToast } = useToasts();
@ -140,7 +139,6 @@ const MovieRequestModal: React.FC<RequestModalProps> = ({
okButtonType={'danger'}
cancelText={intl.formatMessage(messages.close)}
iconSvg={<DownloadIcon className="w-6 h-6" />}
{...props}
>
{intl.formatMessage(messages.requestfrom, {
username: activeRequest.requestedBy.username,
@ -164,7 +162,6 @@ const MovieRequestModal: React.FC<RequestModalProps> = ({
}
okButtonType={'primary'}
iconSvg={<DownloadIcon className="w-6 h-6" />}
{...props}
>
{text}
</Modal>

@ -47,7 +47,6 @@ const TvRequestModal: React.FC<RequestModalProps> = ({
onComplete,
tmdbId,
onUpdating,
...props
}) => {
const { addToast } = useToasts();
const { data, error } = useSWR<TvDetails>(`/api/v1/tv/${tmdbId}`);
@ -222,7 +221,6 @@ const TvRequestModal: React.FC<RequestModalProps> = ({
/>
</svg>
}
{...props}
>
<div className="flex flex-col">
<div className="-mx-4 sm:mx-0 overflow-auto max-h-96">

@ -25,13 +25,12 @@ const RequestModal: React.FC<RequestModalProps> = ({
if (type === 'tv') {
return (
<Transition
enter="opacity-0"
enter="transition opacity-0 duration-300"
enterFrom="opacity-0"
enterTo="opacity-100"
leave="opacity-100"
leave="transition opacity-100 duration-300"
leaveFrom="opacity-100"
leaveTo="opacity-0"
appear
show={show}
>
<TvRequestModal
@ -46,13 +45,12 @@ const RequestModal: React.FC<RequestModalProps> = ({
return (
<Transition
enter="opacity-0"
enter="transition opacity-0 duration-300"
enterFrom="opacity-0"
enterTo="opacity-100"
leave="opacity-100"
leave="transition opacity-100 duration-300"
leaveFrom="opacity-100"
leaveTo="opacity-0"
appear
show={show}
>
<MovieRequestModal

Loading…
Cancel
Save