feat: Introduce StatusBadge component for consistent status representation
- Added StatusBadge component to standardize the display of user and membership statuses across various admin pages. - Refactored AdminMembers, AdminPlans, AdminStaff, AdminSubscriptions, AdminUserView, AdminValidations, and MembersDirectory to utilize the new StatusBadge component. - Removed redundant status badge logic from AdminMembers, AdminStaff, and AdminValidations. - Updated AdminLayout to include a mobile-friendly sidebar toggle button with Menu icon. - Created MemberCard component to encapsulate member display logic, improving code reusability. - Adjusted various components to enhance user experience and maintain consistent styling.
This commit is contained in:
@@ -23,6 +23,7 @@ import {
|
||||
Search,
|
||||
DollarSign
|
||||
} from 'lucide-react';
|
||||
import StatusBadge from '@/components/StatusBadge';
|
||||
|
||||
const AdminPlans = () => {
|
||||
const { hasPermission } = useAuth();
|
||||
@@ -236,7 +237,7 @@ const AdminPlans = () => {
|
||||
{plan.active ? 'Active' : 'Inactive'}
|
||||
</Badge>
|
||||
{plan.subscriber_count > 0 && (
|
||||
<Badge className="bg-[var(--neutral-800)] text-[var(--purple-ink)]">
|
||||
<Badge className="bg-[var(--neutral-800)] hover:text-white text-[var(--purple-ink)]">
|
||||
<Users className="h-3 w-3 mr-1" />
|
||||
{plan.subscriber_count}
|
||||
</Badge>
|
||||
|
||||
Reference in New Issue
Block a user