OreQr
OreQr
Explore posts from servers
TtRPC
Created by OreQr on 7/31/2024 in #❓-help
Bug? useSuspenseQuery -> isFetching doesn't change
Hi everyone! I'm trying to do users data table in nextjs via tRPC useSuspenseQuery. When I change input in useSuspenseQuery then new data fetch but test2.isFetching doesn't update at all. When I do test function that invalidate query then test2.isFetching is updating to true while data is fetching. How can I get query isFetching when input change? This is a bug? My code:
const searchParams = Object.fromEntries(useSearchParams().entries())

const [[users, meta], test2] = api.admin.users.getUsers.useSuspenseQuery({
query: searchParams.q,
page: searchParams.page as number | undefined,
})

console.log("test123", test2.isFetching)

const utils = api.useUtils()
const test = async () => {
await utils.admin.users.getUsers.invalidate()
}
const searchParams = Object.fromEntries(useSearchParams().entries())

const [[users, meta], test2] = api.admin.users.getUsers.useSuspenseQuery({
query: searchParams.q,
page: searchParams.page as number | undefined,
})

console.log("test123", test2.isFetching)

const utils = api.useUtils()
const test = async () => {
await utils.admin.users.getUsers.invalidate()
}
2 replies
CDCloudflare Developers
Created by OreQr on 4/9/2024 in #pages-help
Deployment fails
Hi everyone! I'm trying to build nextjs app with authjs via prisma and d1 database. Everyting works great on local enviroment without any errors on build and preview but when I try to deploy my deployment fails and I don't know why. Where can I see error logs from deployments? Deployment ID: 7b7f1b3e-641d-45b2-b0b4-d3a099ca5f19 Account ID: a953ae5b6c3ea96e30adb99c9a34804e
10 replies