Teodorant, Tech-Priest
Teodorant, Tech-Priest
TtRPC
Created by Teodorant, Tech-Priest on 3/26/2024 in #❓-help
Cannot use usemutation in my nextjs/t3 project
I have this code const mutation = api.auth.addaccount.useMutation(); const handleLogin = async (email: string, password: string) => { await mutation({ email: email, password: password }); }; usemutation is underlined with wavy red and has this error when I hover over it "Property 'useMutation' does not exist on type 'DecorateProcedure<MutationProcedure<{ input: { email: string; password: string; }; output: string; }>>'.ts(2339) "
2 replies
TtRPC
Created by Teodorant, Tech-Priest on 2/24/2024 in #❓-help
In my NEXTJS app can read value next-auth session in localhost ,but not when deployed to Vercel
I have several procedures in my TRPC router (https://github.com/Teodorant1/nighthawk_repair/blob/master/server/index.ts), it seems to be bricking in the ones where I am awaiting the session const session = (await getServerSession(authOptions)) as Session; seems to be the line of code that is bricking it on Vercel
5 replies