From a44ea716cb94394397ca627b2b3ba4eb8126165e Mon Sep 17 00:00:00 2001 From: asvarcas Date: Fri, 16 Oct 2020 13:21:53 -0300 Subject: [PATCH] Fix docs typos --- docs/Actions.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/Actions.md b/docs/Actions.md index 6c2862490a6..bd2e144bb7f 100644 --- a/docs/Actions.md +++ b/docs/Actions.md @@ -283,7 +283,7 @@ const UserProfile = ({ record }) => { ```jsx // syntax -const { data, loading, loaded, error } = useGetMAny(resource, ids, options); +const { data, loading, loaded, error } = useGetMany(resource, ids, options); // example import { useGetMany } from 'react-admin'; @@ -315,7 +315,7 @@ const PostComments = ({ post_id }) => { 'post_id', post_id, { page: 1, perPage: 10 }, - { field: 'published_at', order: 'DESC' } + { field: 'published_at', order: 'DESC' }, {}, 'posts', ); @@ -359,7 +359,7 @@ const IncreaseLikeButton = ({ record }) => { const diff = { likes: record.likes + 1 }; const [update, { loading, error }] = useUpdate('likes', record.id, diff, record); if (error) { return

ERROR

; } - return ; }; ``` @@ -382,14 +382,14 @@ const BulkResetViewsButton = ({ selectedIds }) => { ```jsx // syntax -const [delete, { data, loading, loaded, error }] = useDelete(resource, id, previousData, options); +const [deleteOne, { data, loading, loaded, error }] = useDelete(resource, id, previousData, options); // example import { useDelete } from 'react-admin'; const DeleteButton = ({ record }) => { const [deleteOne, { loading, error }] = useDelete('likes', record.id); if (error) { return

ERROR

; } - return ; }; ``` @@ -397,7 +397,7 @@ const DeleteButton = ({ record }) => { ```jsx // syntax -const [delete, { data, loading, loaded, error }] = useDeleteMany(resource, ids, options); +const [deleteOne, { data, loading, loaded, error }] = useDeleteMany(resource, ids, options); // example import { useDeleteMany } from 'react-admin';