Dor
TTCTheo's Typesafe Cult
•Created by Dor on 10/13/2024 in #questions
Data Caching problem in App Router help plz
When I log in with a user who has specific data, that SAME data appears even after logging out and logging in with a different user. Why is this happening?
Flow:
1. I'm entering
/login
and logging in with user A
- Opening clients page /clients
, viewing data
- Logging out
- Entering /login
again, this time logging in with user B
- Opening clients page /clients
- SEEING THE SAME DATA that appeared to user A
Reloading the page works, but this solution is very primitive and unacceptable to my very high standards of someone that builds stuff for 10 years and made barely $20.
I'm using the T3 stack.1 replies
TTCTheo's Typesafe Cult
•Created by Dor on 9/16/2024 in #questions
T3 Stack with App router - Can't see new posts after mutation
Hey,
I'm using the default T3 stack with App router, TRPC and Drizzzzzle.
I have 2 pages:
/posts
and /posts/new
.
Why when submitting a new post, when I go to /posts
I do not see the newly created post, only after a refresh?
Please help, I'm losing my mind over App Router and kinda frankly hating it so far5 replies
TTCTheo's Typesafe Cult
•Created by Dor on 4/27/2024 in #questions
internal server error when deploying to DigitalOcean
When entering some specific pages in my site, the server gets an error and shuts down.
Why is this happening?
I run it locally - everything works
I run it on vercel - everything works
But on DigitalOcean it breaks
I have a loop of errors of this type:
`
12 replies
TTCTheo's Typesafe Cult
•Created by Dor on 12/14/2023 in #questions
Why can't I extend the user session object?
I'm using the drizzle t3 stack but unable to get this to work!
I want to add a new key to the user object
In other project (with prisma) it's working
This is how im creating my table:
export const users = pgTable("user", { id: text("id").notNull().primaryKey(), name: text("name"), email: text("email").notNull(), field: text("field").default("testing"), emailVerified: timestamp("emailVerified", { mode: "date" }).defaultNow(), image: text("image"), });
4 replies
TTCTheo's Typesafe Cult
•Created by Dor on 12/13/2023 in #questions
How to perform 2 trpc queries, when I need the second query to rely on data from the first?
Sorry for making the title so complex
What I need is simple. I need to make 2 requests but get some data from the first before making the second one.
This is my code which fails to work:
const { data: profile } = api.user.whoami.useQuery(); const { data: company } = api.company.getById.useQuery({ id: profile.companyId });
18 replies