Skip to content

Commit

Permalink
fix: an error was solved with a type
Browse files Browse the repository at this point in the history
  • Loading branch information
Franqsanz committed Nov 14, 2024
1 parent cab3431 commit 26f6a63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/modals/ModalCollection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export function ModalCollection({
e.preventDefault();

if (!isPending) {
if (isEditing && collectionId) {
if (isEditing) {
mutate(name);
} else {
mutate(name);
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ function useAllFavoriteByUser(userId: string | undefined) {
function useCreateCollections(userId: string | undefined) {
return useMutation({
mutationKey: [keys.createCollections],
mutationFn: (name: string | undefined) => postCollections(userId, name),
mutationFn: (name: string) => postCollections(userId, name),
});
}

Expand Down

0 comments on commit 26f6a63

Please sign in to comment.