import { useState, useEffect } from 'react'; import PageMeta from '../../components/common/PageMeta'; import { useToast } from '../../components/ui/toast/ToastContainer'; import { fetchAPI } from '../../services/api'; import { Card } from '../../components/ui/card'; import Badge from '../../components/ui/badge/Badge'; interface User { id: number; email: string; username: string; role: string; is_active: boolean; } export default function Users() { const toast = useToast(); const [users, setUsers] = useState([]); const [loading, setLoading] = useState(true); useEffect(() => { loadUsers(); }, []); const loadUsers = async () => { try { setLoading(true); const response = await fetchAPI('/v1/auth/users/'); setUsers(response.results || []); } catch (error: any) { toast.error(`Failed to load users: ${error.message}`); } finally { setLoading(false); } }; return (

Users

Manage account users and permissions

{loading ? (
Loading...
) : (
{users.map((user) => ( ))}
Email Username Role Status
{user.email} {user.username} {user.role} {user.is_active ? 'Active' : 'Inactive'}
)}
); }