create-effect-fix

This commit is contained in:
Untone 2024-01-24 00:31:07 +03:00
parent 5e8c99332f
commit 0146a5cae2
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ export const PublishSettings = (props: Props) => {
const [topics, setTopics] = createSignal<Topic[]>(sortedTopics()) const [topics, setTopics] = createSignal<Topic[]>(sortedTopics())
createEffect(async () => { createEffect(async () => {
await loadAllTopics() if (!sortedTopics()) await loadAllTopics()
setTopics(sortedTopics()) setTopics(sortedTopics())
}) })

View File

@ -1,8 +1,8 @@
import { gql } from '@urql/core' import { gql } from '@urql/core'
export default gql` export default gql`
mutation DeleteReactionMutation($id: Int!) { mutation DeleteReactionMutation($reaction_id: Int!) {
delete_reaction(id: $id) { delete_reaction(reaction_id: $reaction_id) {
error error
reaction { reaction {
id id