Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 51e06716e5 | |||
| 9d7605ebfe |
@@ -4,20 +4,20 @@ import { User, UsersQueryResponse } from "./_models";
|
|||||||
|
|
||||||
const API_URL = import.meta.env.VITE_APP_THEME_API_URL;
|
const API_URL = import.meta.env.VITE_APP_THEME_API_URL;
|
||||||
const USER_URL = `${API_URL}/user`;
|
const USER_URL = `${API_URL}/user`;
|
||||||
const GET_USERS_URL = `${API_URL}/users/query`;
|
// const GET_USERS_URL = `${API_URL}/users/query`;
|
||||||
|
|
||||||
// const NEW_USER_ENDPOINT = import.meta.env.VITE_APP_USER_ENDPOINT
|
const NEW_USER_ENDPOINT = import.meta.env.VITE_APP_USER_ENDPOINT
|
||||||
|
|
||||||
const getStartedUsers = (query: string): Promise<UsersQueryResponse> => {
|
|
||||||
return axios
|
|
||||||
.get(`${GET_USERS_URL}?${query}`)
|
|
||||||
.then((d: AxiosResponse<UsersQueryResponse>) => d.data);
|
|
||||||
};
|
|
||||||
// const getStartedUsers = (query: string): Promise<UsersQueryResponse> => {
|
// const getStartedUsers = (query: string): Promise<UsersQueryResponse> => {
|
||||||
// return axios
|
// return axios
|
||||||
// .get(`${NEW_USER_ENDPOINT}/loan/started`)
|
// .get(`${GET_USERS_URL}?${query}`)
|
||||||
// .then((d: AxiosResponse<UsersQueryResponse>) => d.data);
|
// .then((d: AxiosResponse<UsersQueryResponse>) => d.data);
|
||||||
// };
|
// };
|
||||||
|
const getStartedUsers = (query: string): Promise<UsersQueryResponse> => {
|
||||||
|
return axios
|
||||||
|
.get(`${NEW_USER_ENDPOINT}/loan/started?${query}`)
|
||||||
|
.then((d: AxiosResponse<UsersQueryResponse>) => d.data);
|
||||||
|
};
|
||||||
|
|
||||||
const getUserById = (id: ID): Promise<User | undefined> => {
|
const getUserById = (id: ID): Promise<User | undefined> => {
|
||||||
return axios
|
return axios
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {KTCardBody} from '../../../../../../_digifi/helpers'
|
|||||||
|
|
||||||
const UsersTable = () => {
|
const UsersTable = () => {
|
||||||
const users = useQueryResponseData()
|
const users = useQueryResponseData()
|
||||||
console.log('users', users)
|
// console.log('users', users)
|
||||||
const isLoading = useQueryResponseLoading()
|
const isLoading = useQueryResponseLoading()
|
||||||
const data = useMemo(() => users, [users])
|
const data = useMemo(() => users, [users])
|
||||||
const columns = useMemo(() => usersColumns, [])
|
const columns = useMemo(() => usersColumns, [])
|
||||||
|
|||||||
Reference in New Issue
Block a user