|
|
@@ -2,7 +2,7 @@ import { SWRResponse } from 'swr';
|
|
|
import useSWRImmutable from 'swr/immutable';
|
|
|
|
|
|
import { apiv3Get } from '../client/util/apiv3-client';
|
|
|
-import { IActivityHasId, ISearchFilter, SupportedActionType } from '../interfaces/activity';
|
|
|
+import { IActivityHasId, ISearchFilter } from '../interfaces/activity';
|
|
|
import { PaginateResult } from '../interfaces/mongoose-utils';
|
|
|
|
|
|
export const useSWRxActivity = (limit?: number, offset?: number, searchFilter?: ISearchFilter): SWRResponse<PaginateResult<IActivityHasId>, Error> => {
|
|
|
@@ -13,10 +13,3 @@ export const useSWRxActivity = (limit?: number, offset?: number, searchFilter?:
|
|
|
.then(result => result.data.paginationResult),
|
|
|
);
|
|
|
};
|
|
|
-
|
|
|
-export const useSWRxAvailableActions = (): SWRResponse<SupportedActionType[], Error> => {
|
|
|
- return useSWRImmutable(
|
|
|
- ['/activity/available-actions'],
|
|
|
- endpoint => apiv3Get(endpoint).then(result => result.data.availableActions),
|
|
|
- );
|
|
|
-};
|