UncleBen
UncleBen
Explore posts from servers
WWasp-lang
Created by UncleBen on 2/3/2024 in #🙋questions
Nested routing?
Hi I'm interested in implementing nested routing for a dashboard that I'm working on. I'm assuming that wasp uses react router under the hood from the utility functions however I cant find any documentation in Wasp for going deeper than a single client level rootComponent layout. React Router has nested routing functionality built in but since the router config is abstracted away into the main.wasp I'm unsure how to go about implementing this. Thank you
2 replies
TTCTheo's Typesafe Cult
Created by UncleBen on 1/6/2024 in #questions
Unable to use setHeader on response object from trpc context (using app router)
I'm trying to set a JWT cookie in a login mutation in a router, here's the code snippet I'm using to try set the token ctx.res.setHeader( "Set-Cookie", cookie.serialize("user-token", token, { httpOnly: true, path: "/", secure: env.NODE_ENV === "production", }), ); however in the console I receive this error ❌ tRPC failed on auth.login: Cannot read properties of undefined (reading 'setHeader') would anyone else happen to be knowledgeable on this thanks
3 replies