toadmilk
toadmilk5mo ago

how are you meant to set up client side queries?

why is there no type on the data? don't know what to do about the deprecated onSuccess stuff either.
trpc.authCallback.useQuery(undefined, {
onSuccess: ({success}) => {
if (success) {
router.push(origin ? `/${origin}` : '/dashboard');
}
},
onError: (err) => {
if (err.data?.code === 'UNAUTHORIZED') {
router.push('/sign-in');
}
},
trpc.authCallback.useQuery(undefined, {
onSuccess: ({success}) => {
if (success) {
router.push(origin ? `/${origin}` : '/dashboard');
}
},
onError: (err) => {
if (err.data?.code === 'UNAUTHORIZED') {
router.push('/sign-in');
}
},
Would really appreciate if someone could help me out 🙏
No description
1 Reply
toadmilk
toadmilkOP5mo ago
"@tanstack/react-query": "4.35.3",
"@trpc/client": "10.38.4",
"@trpc/next": "10.38.4",
"@trpc/react-query": "10.38.4",
"@trpc/server": "10.38.4",
"@tanstack/react-query": "4.35.3",
"@trpc/client": "10.38.4",
"@trpc/next": "10.38.4",
"@trpc/react-query": "10.38.4",
"@trpc/server": "10.38.4",
on this ver lmk if you need any other info still a noob with tRPC -_-

Did you find this page helpful?