From 0146a5cae2de8625dbf8d052a796cb9bfe532f0b Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 24 Jan 2024 00:31:07 +0300 Subject: [PATCH] create-effect-fix --- src/components/Views/PublishSettings/PublishSettings.tsx | 2 +- src/graphql/mutation/core/reaction-destroy.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Views/PublishSettings/PublishSettings.tsx b/src/components/Views/PublishSettings/PublishSettings.tsx index 0814362e..c8b0fe54 100644 --- a/src/components/Views/PublishSettings/PublishSettings.tsx +++ b/src/components/Views/PublishSettings/PublishSettings.tsx @@ -44,7 +44,7 @@ export const PublishSettings = (props: Props) => { const [topics, setTopics] = createSignal(sortedTopics()) createEffect(async () => { - await loadAllTopics() + if (!sortedTopics()) await loadAllTopics() setTopics(sortedTopics()) }) diff --git a/src/graphql/mutation/core/reaction-destroy.ts b/src/graphql/mutation/core/reaction-destroy.ts index ed90143d..be1b5828 100644 --- a/src/graphql/mutation/core/reaction-destroy.ts +++ b/src/graphql/mutation/core/reaction-destroy.ts @@ -1,8 +1,8 @@ import { gql } from '@urql/core' export default gql` - mutation DeleteReactionMutation($id: Int!) { - delete_reaction(id: $id) { + mutation DeleteReactionMutation($reaction_id: Int!) { + delete_reaction(reaction_id: $reaction_id) { error reaction { id