Migrate react-query to v5

This commit is contained in:
Prayag Prajapati committed 2023-10-26 21:58:30 +05:30
1 parent f5c6e97355
commit d44848516a
21 files changed
+66 -86

No files matched your search

+3 -3
View File
@@ -72,13 +72,13 @@ const LikeButton = ({
>
<CircularProgress
style={{
opacity: mutation.isLoading ? 1 : 0,
opacity: mutation.isPending ? 1 : 0,
transition: "opacity 200ms",
}}
/>
<IconButton
onClick={(e) => {
if (!mutation.isLoading) {
if (!mutation.isPending) {
e.stopPropagation();
mutation.mutate();
}
@@ -92,7 +92,7 @@ const LikeButton = ({
display: "flex",
alignItems: "center",
justifyContent: "center",
opacity: mutation.isLoading ? 0.5 : 1,
opacity: mutation.isPending ? 0.5 : 1,
}}
>
{isFavorite ? (