diff --git a/frontend/src/pages/Admin/CustomersPage.jsx b/frontend/src/pages/Admin/CustomersPage.jsx
index 8c6caf5..40d00cd 100644
--- a/frontend/src/pages/Admin/CustomersPage.jsx
+++ b/frontend/src/pages/Admin/CustomersPage.jsx
@@ -37,8 +37,9 @@ import {
import { useAdminUsers, useUpdateUser } from '@hooks/adminHooks';
import { format } from 'date-fns';
import EmailDialog from '@components/EmailDialog';
-
+import { useAuth } from '@hooks/reduxHooks';
const AdminCustomersPage = () => {
+ const { user, isAuthenticated } = useAuth();
const [page, setPage] = useState(0);
const [rowsPerPage, setRowsPerPage] = useState(10);
const [search, setSearch] = useState('');
@@ -328,24 +329,25 @@ const AdminCustomersPage = () => {
}
- label={formData.is_disabled ? "Account is disabled" : "Account is active"}
+ label={`${formData.is_disabled ? "Account is disabled" : "Account is active"}` + `${user === currentUser.id && formData.is_admin? " (Current user can\'t disabled themselves)" : "" }`}
sx={{ my: 2, display: 'block' }}
/>
-
}
- label={formData.is_admin ? "Account is Admin" : "Account is not Admin"}
+ label={`${formData.is_admin ? "Account is Admin" : "Account is not Admin"}` + `${user === currentUser.id && formData.is_admin? " (Admin can't downgrade themselves)" : "" }`}
sx={{ my: 2, display: 'block' }}
/>