From bff441b88559f7d4ca6f32b2f80cda941ff4b0a6 Mon Sep 17 00:00:00 2001 From: Martastain Date: Wed, 6 Nov 2024 22:01:35 +0100 Subject: [PATCH] fix: remove toasts from upload dialog --- frontend/src/containers/Upload.jsx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/frontend/src/containers/Upload.jsx b/frontend/src/containers/Upload.jsx index 004c1909..2a1d9163 100644 --- a/frontend/src/containers/Upload.jsx +++ b/frontend/src/containers/Upload.jsx @@ -2,7 +2,6 @@ import axios from 'axios' import styled from 'styled-components' import { useState, useRef, useMemo } from 'react' -import { toast } from 'react-toastify' import { Dialog, Button, Progress } from '/src/components' import nebula from '/src/nebula' @@ -134,7 +133,7 @@ const UploadDialog = ({ onHide, assetData }) => { const handleHide = () => { if (status === 'uploading') { - toast.error('Upload in progress') + console.warn('Unable to close dialog: upload in progress') return } onHide() @@ -159,18 +158,11 @@ const UploadDialog = ({ onHide, assetData }) => { }) setStatus('success') - toast.success('Upload finished') } catch (error) { console.error(error) if (axios.isCancel(error)) { console.error('Request canceled', error.message) } else if (error.response) { - toast.error( - <> - Upload failed -

{error.response.data?.detail || 'Unknown error'}

- - ) console.error('Error response', error.response) } setBytesTransferred(0)