JuaniS
JuaniS
Explore posts from servers
TTCTheo's Typesafe Cult
Created by JuaniS on 10/22/2023 in #questions
Couldn't find any `pages` or `app` directory
Im trying to deploy a t3 app on vercel with the pages directory and its throwing me this error on de deploy console
4 replies
TTCTheo's Typesafe Cult
Created by JuaniS on 7/8/2023 in #questions
Next api routes stoped working since clerk installed
I installed clerk in my app and auth is working as expected. My probles is that all my api routes stoped working, all of them throw error 404.
8 replies
TTCTheo's Typesafe Cult
Created by JuaniS on 6/1/2023 in #questions
Is it possible to generate a github action to build a preview of a pull request in nextjs?
Im looking for a way to generate preview for my nextjs project but I didnt find a way to do it that works for me.
6 replies
TTCTheo's Typesafe Cult
Created by JuaniS on 4/28/2023 in #questions
Function overloads with more than 1 parameter
Im trying to overload a function that the first two parameters are string and are not optional, the first parameter should be an union type of strings and the second parameter should also be a union type of strings but these should depende on the first parameter. For example, we have the next function
function callOutsideFunction(module: string, method: string): unknown
function callOutsideFunction(module: string, method: string): unknown
where the module can be climate and date and when i pass any of those have the correct possible methods. I tried overloading the function like this:
function callOutsideFunction(module: 'climate', method: 'climateMethod 1' | 'climateMethod2'): unknown
function callOutsideFunction(module: 'date', method: 'dateMethod 1' | 'dateMethod2'): unknown
function callOutsideFunction(module: 'climate', method: 'climateMethod 1' | 'climateMethod2'): unknown
function callOutsideFunction(module: 'date', method: 'dateMethod 1' | 'dateMethod2'): unknown
but I end up having a union type of all the methods even though I pass certain module as a parameter. Is there any way of fix this?
3 replies
TTCTheo's Typesafe Cult
Created by JuaniS on 4/14/2023 in #questions
how to extend clerk's users metadata
Im wondering how to extend clerk users model by adding some data about the user's role. I know it can be done but I don't know how I can do it in a way to check once the user sign in it check if the user's email is in a table with a role and add it its correspondent role. Clerk's docs has an example of adding metadata but the example is unclear for me https://clerk.com/docs/users/user-metadata
9 replies