diff --git a/src/components/Error.tsx b/src/components/Error.jsx similarity index 85% rename from src/components/Error.tsx rename to src/components/Error.jsx index 60d1256..b3c02db 100644 --- a/src/components/Error.tsx +++ b/src/components/Error.jsx @@ -34,7 +34,12 @@ const Alert = ({ variant = 'info', message, Icon }) => { 'animate-slideDown' )} > -
+
{Icon && }

{message}

diff --git a/src/pages/Branches.jsx b/src/pages/Branches.jsx index 2d5d04f..dad70d8 100644 --- a/src/pages/Branches.jsx +++ b/src/pages/Branches.jsx @@ -9,9 +9,20 @@ const Branches = () => { const [branches, setBranches] = useState(null); const [alert, setAlert] = useState(null); return ( -
-
- {alert && alert.type === 'success' ? : alert && alert.type === 'warning' && } +
+
+ {alert && alert.type === 'success' ? ( + + ) : ( + alert && + alert.type === 'warning' && ( + + ) + )} {/* Forma */} {/* Jadval */} diff --git a/src/pages/Clients.jsx b/src/pages/Clients.jsx index a69febc..81b3569 100644 --- a/src/pages/Clients.jsx +++ b/src/pages/Clients.jsx @@ -12,11 +12,27 @@ const Clients = () => { return (
-
-
- {alert && alert.type === 'success' ? : alert && alert.type === 'warning' && } +
+
+ {alert && alert.type === 'success' ? ( + + ) : ( + alert && + alert.type === 'warning' && ( + + ) + )} - +
); diff --git a/src/pages/Currency.jsx b/src/pages/Currency.jsx index ab9879e..cb95018 100644 --- a/src/pages/Currency.jsx +++ b/src/pages/Currency.jsx @@ -11,12 +11,19 @@ const Currency = () => { return (
-
+
{/* Sarlavha */}
{/* Xatolik */} - {alert && alert.type === 'success' ? : alert && alert.type === 'warning' && } + {alert && alert.type === 'success' ? ( + + ) : ( + alert && + alert.type === 'warning' && ( + + ) + )} {/* Forma */} diff --git a/src/pages/Employees.jsx b/src/pages/Employees.jsx index d85451e..a80ed94 100644 --- a/src/pages/Employees.jsx +++ b/src/pages/Employees.jsx @@ -12,16 +12,32 @@ const Employees = () => { return (
-
+
{/* Sarlavha */} -
+
{/* Xatolik */} - {alert && alert.type === 'success' ? : alert && alert.type === 'warning' && } + {alert && alert.type === 'success' ? ( + + ) : ( + alert && + alert.type === 'warning' && ( + + ) + )} {/* Jadval */} - +
); diff --git a/src/pages/Payments.jsx b/src/pages/Payments.jsx index 4ada2eb..a61dce8 100644 --- a/src/pages/Payments.jsx +++ b/src/pages/Payments.jsx @@ -9,9 +9,20 @@ const Payments = () => { return (
-
-
- {alert && alert.type === 'success' ? : alert && alert.type === 'warning' && } +
+
+ {alert && alert.type === 'success' ? ( + + ) : ( + alert && + alert.type === 'warning' && ( + + ) + )}
diff --git a/src/pages/Reference.jsx b/src/pages/Reference.jsx index 024ec78..ebc2183 100644 --- a/src/pages/Reference.jsx +++ b/src/pages/Reference.jsx @@ -10,9 +10,20 @@ const Reference = () => { const [idHouses, setIdHouses] = useState(null); return (
-
-
- {alert && alert.type === 'success' ? : alert && alert.type === 'warning' && } +
+
+ {alert && alert.type === 'success' ? ( + + ) : ( + alert && + alert.type === 'warning' && ( + + ) + )}
diff --git a/src/pages/Warhouses.jsx b/src/pages/Warhouses.jsx index 9c7800f..ee447cb 100644 --- a/src/pages/Warhouses.jsx +++ b/src/pages/Warhouses.jsx @@ -10,9 +10,20 @@ const Warhouses = () => { const [idHouses, setIdHouses] = useState(null); return (
-
-
- {alert && alert.type === 'success' ? : alert && alert.type === 'warning' && } +
+
+ {alert && alert.type === 'success' ? ( + + ) : ( + alert && + alert.type === 'warning' && ( + + ) + )}