signoz/frontend/src/hooks/dashboard/useUpdateDashboard.tsx
dnazarenkoo 1eabacbaf4
feat: add the export panel to the traces explorer (#2983)
* feat: add the export panel to the traces explorer

* feat: onExport dashboard widget is updated

* chore: made common hook useDashboard

---------

Co-authored-by: Palash Gupta <palashgdev@gmail.com>
2023-06-28 18:25:20 +05:30

15 lines
476 B
TypeScript

import update from 'api/dashboard/update';
import { useMutation, UseMutationResult } from 'react-query';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { Dashboard } from 'types/api/dashboard/getAll';
import { Props } from 'types/api/dashboard/update';
export const useUpdateDashboard = (): UseUpdateDashboard => useMutation(update);
type UseUpdateDashboard = UseMutationResult<
SuccessResponse<Dashboard> | ErrorResponse,
unknown,
Props,
unknown
>;