diff --git a/app/blobtx/page.tsx b/app/blobtx/page.tsx index 7c6687c..e341de6 100644 --- a/app/blobtx/page.tsx +++ b/app/blobtx/page.tsx @@ -84,14 +84,12 @@ const BlobTX = () => { const files = event.dataTransfer.files?.item(0) if (!validImageTypes.includes(files?.type)) { - currentOpenState() setLoading({ uploadImageError: 'Only PNG, JPG, JPEG, GIF formats are supported. Please select again.' }) return } const fileSizeInKB = files.size / 1024 if (fileSizeInKB > 128) { - currentOpenState() setLoading({ uploadImageError: 'File size exceeding 128kB! Please select again.' }) return } @@ -106,13 +104,11 @@ const BlobTX = () => { const fileSizeInKB = file.size / 1024 if (!validImageTypes.includes(file?.type)) { - currentOpenState() setLoading({ uploadImageError: 'Only PNG, JPG, JPEG, GIF formats are supported. Please select again.' }) return } if (fileSizeInKB > 128) { - currentOpenState() setLoading({ uploadImageError: 'File size exceeding 128kB! Please select again.' }) return } @@ -126,7 +122,7 @@ const BlobTX = () => { }, []) useEffect(() => { - if (loading.loading || loading.success || loading.error || shownettip) { + if (loading.loading || loading.success || loading.error || shownettip || loading.uploadImageError) { currentOpenState() } else { currentCloseState() diff --git a/components/AToast.tsx b/components/AToast.tsx index d862125..cd7da18 100644 --- a/components/AToast.tsx +++ b/components/AToast.tsx @@ -11,12 +11,6 @@ type ToastType = { } export const AToastFull: FC = ({ onLeftButton, className, contentClassName, onRightButton, chilren, size = '', ...other }) => { - useEffect(() => { - document.documentElement.classList.add('overflow-hidden') - return () => { - document.documentElement.classList.remove('overflow-hidden') - } - }, []) return (