Унификация отображения ошибок: LoadingError для загрузки, Toast для действий
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 34s

This commit is contained in:
poignatov
2026-01-11 15:51:28 +03:00
parent 8023fb9108
commit 932dba8682
17 changed files with 284 additions and 91 deletions

View File

@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react'
import './Toast.css'
function Toast({ message, onClose, duration = 3000 }) {
function Toast({ message, onClose, duration = 3000, type = 'success' }) {
const [isVisible, setIsVisible] = useState(true)
useEffect(() => {
@@ -18,7 +18,7 @@ function Toast({ message, onClose, duration = 3000 }) {
if (!isVisible) return null
return (
<div className={`toast ${isVisible ? 'toast-visible' : ''}`}>
<div className={`toast toast-${type} ${isVisible ? 'toast-visible' : ''}`}>
<div className="toast-content">
<span className="toast-message">{message}</span>
</div>