Theo's Typesafe Cult

TTC

Theo's Typesafe Cult

Join the community to ask questions about Theo's Typesafe Cult and get answers from other members.

Join

how to fix images adjusting after loading

i am running into a problem where the images adjust their size after the page loads i don't know what is causing this to happen any help ?
No description

trying to have multiple tables for different projects in vercel postgres using drizzle

I followed Theo's react tutorial and had a t3-project_image table that I use with it on vercel storage. I am creating a new project that is an e-comm-site and it has the following tables e-comm-site_account e-comm-site_user e-comm-site_verification_token...

session callback are not being invoked?

when i try to implement t3stack to my existing app, i have a problem with the default discord authentication flow. everytime i try to log in to my application, only the signIn callback's console.log() values are shown in the console....
No description

How do I set the cookie in the procedure?

I am using the ‘npm create t3-app@latest’ app router. Here I do not want to use nextAuth for authentication, I want to use email address and password. However, Perhaps use NextResponse to implement the following? But how would I set the cookie in the procedure and let the requesting browser set it?...

Coding on Snapdragon X Elite

Anyone using the new Surface Laptop 7 for coding? I don't want to get a Mac because, for the same specs, it's over 50% more expensive, so it's not an option for me...

@t3-oss/env-nextjs with a custom Next.js server?

Hi, I'm trying to setup the @t3-oss/env-nextjs package with my Next.js app that uses a custom server and was wondering if anyone has had any luck with something similar?

Is there a built-in way to prevent ID duplicates using Zod?

Let's say that your data is an array of objects with "id" and "name" fields: ``` [ {...

Express-Like Auth Middleware Pattern For Server Actions?

Since all server actions should be authenticated, I have sprinkled clerk's auth() function at the top of every single action's function body. This seems silly. I liked how Express allows you to apply an auth middleware to collections of routes. For instance: ``` const authMiddleware = (req, res, next) => { const authToken = req.headers['authorization']; ...

switch function in drizzle

I'm following the "Add Clerk Authentication & Stripe Payments to your NextJS tRPC Application" tutorial. The tutorial uses T3 app + Prisma + Clerk. I've used drizzle for my T3 app and need help converting this switch function written in Prisma-speak to Drizzle-speak....
No description

Everyone help me, how to handle server component error?

Code: ``` import { api, HydrateClient } from "@/trpc/server"; import { columns } from "./columns"; import { DataTable } from "./data-table";...

Table "appointment" does not exist in the current database error, but other routes do alright

Hi. I'm using T3 with App Router and I am running into an issue with tRPC and Prisma. I have an appointment tRPC router that handles and returns data from Prisma. I have a page where all appointments are rendered within a table - everything fetches just fine. But when I want to perform a mutation of one appointment, tRPC spits out a Prisma error saying that the appointment table doesn't exist. There are no steps to reproduce, unless it has something to do with creating a trigger manually through the command line in PSQL.
How can I fix this?...
Solution:
Ugh, I love trying for hours to no avail, posting a question and solving it within 10 minutes. It was the trigger returning an error every interaction because I misspelled a relation.

Return mapped data in fetch, or map in components?

Which do you prefer and why? Alternatively, what are the use cases for each?

Tanstack Table. flexRender

What is this flexRender? How can I use markup with him? How does it work? Is there any documentation about it?
No description

can anyone help me to bundle t3app for electronjs?

i want to build desktop application using t3 stack.

Redirects in next.config.js - App Router - NextJS 14

Hi guys, I was wondering how can I make a redirect with a nagavite lookahead in the slug. Let's say I have these two routes: - /blog/new - /blog/:id/overview...

Auto select language react app

I'm not a front-end man, how can i have my website in english for all people outside my country? and my language if you open website from my country? I'm using react 🙂
Solution:
Change the language in browser settings

My uploadthing callback endpoint seems to be serving a 400 but i haven't been able to debug why

It works in dev, but now that I've pushed to prod. I'm seeing this error in my logs,
"\u001b[41m\u001b[30m ⨯ UPLOADTHING 2:09:44 AM \u001b[0m Invalid signature"
"\u001b[41m\u001b[30m ⨯ UPLOADTHING 2:09:44 AM \u001b[0m Invalid signature"
but not sure how/why...
Solution:
Damn I got it -- it's on a cloudflare worker. Buffer doesn't exist

T3 Next Auth / TRPC Documentation is outdated

I noticed t3 is using next-auth v4 instead of v5 (makes sense, 5 is in beta still). But reading through the docs is still confusing since the links are between v4/v5 and next pages/app router. Does anyone have any reliable sources/examples for a next-auth v5 t3 implementation?...

drizzle

Just a heads up, if you are having issues using, run db:push and get these error messages, please try connecting to another network and do the push again, your provided ip might be blacklisted, or your isp might have them blacklisted:thinkies: , after connecting to my hotspot i was able to do the push and connect to drizzle studio without issues
Solution:
Just a heads up, if you are having issues using, run db:push and get these error messages, please try connecting to another network and do the push again, your provided ip might be blacklisted, or your isp might have them blacklisted:thinkies: , after connecting to my hotspot i was able to do the push and connect to drizzle studio without issues
No description

applying migrations...Error: getaddrinfo ENOTFOUND postgres

Hi Guys , I am using nextjs app router with drizzle with postgres and its working fine in development mode but when i am running it with docker compose up --build its giving me this error ``` [⣷] applying migrations...Error: getaddrinfo ENOTFOUND postgres 1.013 at /app/node_modules/pg-pool/index.js:45:11...