variable_name
Explore posts from serversTTCTheo's Typesafe Cult
•Created by variable_name on 8/26/2023 in #questions
T3 ENV fails when trying to generate migrations
When i try to generate drizzle migrations through drizzle-kit generate:pg it fails with message:
I have my environment variables inside .env file, and app doesn't break. There's only problem when generating migrations. Has somebody encountered similar problem?
1 replies
TTCTheo's Typesafe Cult
•Created by variable_name on 7/8/2023 in #questions
How to pass typesafe react-hook-form form object
I'm using react-hook-form to handle update user profile form.
I'm also using uploadthing for image upload (updating user profile pic), so I've created a custom upload button component and I'm passing to it a form, so I could setValue manually when upload is complete.
Inside UploadButtonProps I've declared form prop as a UseFormReturn type like this
So, the problem is now when I'm trying to use form to setValue I do not have typesafety.
How to achieve typesafety? I'm also using zod for form schema.
2 replies
TTCTheo's Typesafe Cult
•Created by variable_name on 7/5/2023 in #questions
Clerk: Is it possible to create custom metadata on signup using Clerk?
I need to create a custom metadata "credits" on each new user object, is it possible to achieve that with Clerk?
One of my ideas was to call the api route after sign up which will update user object using clerkClient.
But fetch never get called because authenticateWithRedirect automatically redirects to the /dashboard as soon as sign up happens. Any ideas, how to achieve this? I need to create public metadata, so unsafeMetadata is not a solution.
4 replies