Version: 3.xx.xx
useLogList
Overview
If you need to list audit log events refine provides the useLogList hook for it, It uses the get method from auditLogProvider under the hood.
Usage
CAUTION
This hook can only be used if auditLogProvider's get method is provided.
import { useLogList } from "@pankod/refine-core";
const postAuditLogResults = useLogList({
resource: "posts",
});
API
Properties
| Property | Type | Default |
|---|---|---|
resource Required | string | Action that it reads from route |
| action | string | |
| author | Record<string, any> | |
| meta | Record<string, any> | |
| metaData | MetaDataQuery | |
| queryOptions | UseQueryOptions<TData, TError> |
Type Parameters
| Property | Desription | Type | Default |
|---|---|---|---|
| TData | Result data of the query. Extends BaseRecord | BaseRecord | BaseRecord |
| TError | Custom error object that extends HttpError | HttpError | HttpError |
Return values
| Description | Type |
|---|---|
Result of the react-query's useQuery | UseQueryResult<{ data: TData; }> |