Himanshu Gupta 41f7a7993d
feat: all dashboard is migrated to useQuery and action is removed (#3384)
* feat: all dashboard is migrated to useQuery and action is removed

* chore: delete functionality is updated

---------

Co-authored-by: Palash Gupta <palashgdev@gmail.com>
2023-09-11 10:51:10 +05:30

9 lines
274 B
TypeScript

import axios from 'api';
import { ApiResponse } from 'types/api';
import { Dashboard } from 'types/api/dashboard/getAll';
export const getAllDashboardList = (): Promise<Dashboard[]> =>
axios
.get<ApiResponse<Dashboard[]>>('/dashboards')
.then((res) => res.data.data);