Skip to content

Commit

Permalink
Use QueryClient instead of SwrClient
Browse files Browse the repository at this point in the history
  • Loading branch information
ogaclejapan committed May 12, 2024
1 parent 284cf22 commit d2c4ebb
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ fun rememberQueriesErrorReset(
@Composable
fun KeepAlive(
key: QueryKey<*>,
// TODO Use QueryClient instead of SwrClient
client: SwrClient = LocalSwrClient.current
client: QueryClient = LocalSwrClient.current
) {
val query = remember(key) { client.getQuery(key) }
LaunchedEffect(Unit) {
Expand All @@ -68,8 +67,7 @@ fun KeepAlive(
@Composable
fun KeepAlive(
key: InfiniteQueryKey<*, *>,
// TODO Use QueryClient instead of SwrClient
client: SwrClient = LocalSwrClient.current
client: QueryClient = LocalSwrClient.current
) {
val query = remember(key) { client.getInfiniteQuery(key) }
LaunchedEffect(Unit) {
Expand Down

0 comments on commit d2c4ebb

Please sign in to comment.