This commit is contained in:
2026-03-21 17:23:27 +03:30
parent 878d8fc544
commit 451a814347
17 changed files with 122 additions and 45 deletions
@@ -13,10 +13,10 @@ import UserList from '@views/apps/user/list'
// API Imports
import { userManagementService } from '@/libs/api'
import type { User } from '@/libs/api/services/userManagementService'
import type { UsersType } from '@/types/apps/userTypes'
const UserListApp = () => {
const [users, setUsers] = useState<User[]>([])
const [users, setUsers] = useState<UsersType[]>([])
const [loading, setLoading] = useState(true)
const [error, setError] = useState<string | null>(null)
@@ -24,7 +24,7 @@ const UserListApp = () => {
const fetchUsers = async () => {
try {
setLoading(true)
const response = await userManagementService.getUsers()
const response = await userManagementService.getUsers() as any
setUsers(response.users)
} catch (err: any) {
setError(err.message || 'خطا در دریافت لیست کاربران')