Skip to content

Commit

Permalink
Also apply noToast option to query, upload, and download
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchBradley committed Jun 22, 2024
1 parent d58ceff commit d690b29
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions src/areas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,12 @@ const ContentContainer = () => {
)
},
onFail: (error) => {
toasts.addToast({
content: error,
type: "error",
})
if (!eventMsg.data.noToast) {
toasts.addToast({
content: error,
type: "error",
})
}
console.log(error)
if (!eventMsg.data.noDispatch)
dispatchToExtensions(
Expand Down Expand Up @@ -217,10 +219,12 @@ const ContentContainer = () => {
)
},
onFail: (error) => {
toasts.addToast({
content: error,
type: "error",
})
if (!eventMsg.data.noToast) {
toasts.addToast({
content: error,
type: "error",
})
}
if (!eventMsg.data.noDispatch)
dispatchToExtensions(
"upload",
Expand Down Expand Up @@ -265,10 +269,12 @@ const ContentContainer = () => {
)
},
onFail: (error) => {
toasts.addToast({
content: error,
type: "error",
})
if (!eventMsg.data.noToast) {
toasts.addToast({
content: error,
type: "error",
})
}
if (!eventMsg.data.noDispatch)
dispatchToExtensions(
"download",
Expand Down

0 comments on commit d690b29

Please sign in to comment.