Skip to content

Commit da11af2

Browse files
authored
Merge pull request #91 from nebulabroadcast/martastain/fix-dialog-toast-issue
Fix toasts being obscured by dialog shade
2 parents aa239e3 + bff441b commit da11af2

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

frontend/src/components/Dialog.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const StyledDialog = styled.dialog`
2525
&::backdrop {
2626
background-color: rgba(0, 0, 0, 0);
2727
backdrop-filter: none;
28+
z-index: 999; // P5e04
2829
}
2930
3031
&[open] {

frontend/src/containers/Upload.jsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import axios from 'axios'
22
import styled from 'styled-components'
33

44
import { useState, useRef, useMemo } from 'react'
5-
import { toast } from 'react-toastify'
65
import { Dialog, Button, Progress } from '/src/components'
76

87
import nebula from '/src/nebula'
@@ -134,7 +133,7 @@ const UploadDialog = ({ onHide, assetData }) => {
134133

135134
const handleHide = () => {
136135
if (status === 'uploading') {
137-
toast.error('Upload in progress')
136+
console.warn('Unable to close dialog: upload in progress')
138137
return
139138
}
140139
onHide()
@@ -159,18 +158,11 @@ const UploadDialog = ({ onHide, assetData }) => {
159158
})
160159

161160
setStatus('success')
162-
toast.success('Upload finished')
163161
} catch (error) {
164162
console.error(error)
165163
if (axios.isCancel(error)) {
166164
console.error('Request canceled', error.message)
167165
} else if (error.response) {
168-
toast.error(
169-
<>
170-
<strong>Upload failed</strong>
171-
<p>{error.response.data?.detail || 'Unknown error'}</p>
172-
</>
173-
)
174166
console.error('Error response', error.response)
175167
}
176168
setBytesTransferred(0)

0 commit comments

Comments
 (0)