Skip to content

Commit

Permalink
chore(*): resolve prettier error
Browse files Browse the repository at this point in the history
  • Loading branch information
manudeli committed Mar 18, 2024
1 parent 1b698ca commit 806f53c
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions docs/framework/react/guides/disabling-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,18 @@ function Todos() {
const [filter, setFilter] = React.useState('')

const { data } = useQuery({
queryKey: ['todos', filter],
queryFn: () => fetchTodos(filter),
// 猬囷笍 disabled as long as the filter is empty
enabled: !!filter
queryKey: ['todos', filter],
queryFn: () => fetchTodos(filter),
// 猬囷笍 disabled as long as the filter is empty
enabled: !!filter,
})

return (
<div>
// 馃殌 applying the filter will enable and execute the query
<FiltersForm onApply={setFilter} />
{data && <TodosTable data={data} />}
</div>
<div>
// 馃殌 applying the filter will enable and execute the query
<FiltersForm onApply={setFilter} />
{data && <TodosTable data={data} />}
</div>
)
}
```
Expand Down Expand Up @@ -108,17 +108,17 @@ function Todos() {
const [filter, setFilter] = React.useState<string | undefined>()

const { data } = useQuery({
queryKey: ['todos', filter],
// 猬囷笍 disabled as long as the filter is undefined or empty
queryFn: filter ? () => fetchTodos(filter) : skipToken,
queryKey: ['todos', filter],
// 猬囷笍 disabled as long as the filter is undefined or empty
queryFn: filter ? () => fetchTodos(filter) : skipToken,
})

return (
<div>
// 馃殌 applying the filter will enable and execute the query
<FiltersForm onApply={setFilter} />
{data && <TodosTable data={data} />}
</div>
<div>
// 馃殌 applying the filter will enable and execute the query
<FiltersForm onApply={setFilter} />
{data && <TodosTable data={data} />}
</div>
)
}
```
Expand Down

0 comments on commit 806f53c

Please sign in to comment.