Skip to content

Commit

Permalink
Merge pull request #6382 from Cornul11/master
Browse files Browse the repository at this point in the history
Docs: Fix wrong ending tags in Actions documentation
  • Loading branch information
fzaninotto authored Jun 22, 2021
2 parents 884acf6 + b9966d2 commit 5328ae2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/Actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ const IncreaseLikeButton = ({ record }) => {
update('likes', record.id, diff, record)
}
if (error) { return <p>ERROR</p>; }
return <button disabled={loading} onClick={handleClick}>Like</div>;
return <button disabled={loading} onClick={handleClick}>Like</button>;
};

// or set params when calling the hook
Expand All @@ -459,7 +459,7 @@ const IncreaseLikeButton = ({ record }) => {
const diff = { likes: record.likes + 1 };
const [update, { loading, error }] = useUpdate('likes', record.id, diff, record);
if (error) { return <p>ERROR</p>; }
return <button disabled={loading} onClick={update}>Like</div>;
return <button disabled={loading} onClick={update}>Like</button>;
};
```

Expand Down Expand Up @@ -520,7 +520,7 @@ const DeleteButton = ({ record }) => {
deleteOne('likes', record.id, record)
}
if (error) { return <p>ERROR</p>; }
return <button disabled={loading} onClick={handleClick}>Delete</div>;
return <button disabled={loading} onClick={handleClick}>Delete</button>;
};

// set params when calling the hook
Expand All @@ -529,7 +529,7 @@ import { useDelete } from 'react-admin';
const DeleteButton = ({ record }) => {
const [deleteOne, { loading, error }] = useDelete('likes', record.id, record);
if (error) { return <p>ERROR</p>; }
return <button disabled={loading} onClick={deleteOne}>Delete</div>;
return <button disabled={loading} onClick={deleteOne}>Delete</button>;
};
```

Expand Down

0 comments on commit 5328ae2

Please sign in to comment.