barry
Explore posts from serversTTCTheo's Typesafe Cult
•Created by barry on 8/2/2024 in #questions
DISCORD OAUTH Problem
OAUTH2, Discord
Anyone ever run into this error? https://gist.github.com/barrybtw/8bb94fdcdbbee3d1a24e0e4c2c2f8fea
I can run it locally just fine, but whenever I deploy it, I get this error in my logs...?
Somehow????
https://reactiflux-com.fly.dev/api/auth/callback/discord Redirects to localhost 3000 wtf
I've searched the whole codebase for any references to localhost:3000 but no luck, so fucking confused lol
Where's this shit coming from
9 replies
TTCTheo's Typesafe Cult
•Created by barry on 12/19/2023 in #questions
Tailwind Intellisense CVA
I tried this... not working lol, no intellisense, using Vite & running with bun
13 replies
TTCTheo's Typesafe Cult
•Created by barry on 12/19/2023 in #questions
Turborepo kicks my ass
Using turborepo, and I've got a package called ui in which I have components
Said components does this
import { cn } from "../../lib/utils"
But I'd like to do this
import { cn } from "@ui/lib/utils"
There's no immediate errors in the package as the aliases and what not are set fine
But in the app where I import the Button component I get this error
Failed to resolve import "@ui/lib/utils" from "../../packages/ui/components/button.tsx". Does the file exist?
FULL ERROR: https://gist.github.com/barrybtw/2feb7de19242fc3229c35abaf37258c11 replies
TTCTheo's Typesafe Cult
•Created by barry on 12/1/2023 in #questions
Caddyfile, docker-compose
I've got this Caddyfile
And it seems to block my SSL cert in development
Any way to tell it to just, not use this in development with environment variables?
And tell it to do something else but only in devleopment?
Like
1 replies
TTCTheo's Typesafe Cult
•Created by barry on 11/30/2023 in #questions
drizzle + express + ts errors
https://gist.github.com/barrybtw/67c379371c3f52a61758c94474e8ebf8
In regards to the route
auth_router.post("/signup", () => ...)
, I get this error
I don't seem to be breaking that so a bit confused?
And if I use a username that's already taken (username has the unique constraint) I get this error
PostgresError: duplicate key value violates unique constraint "user_username_unique"
, and I can't import the type PostgresError as it's not exported but it's part of the types in the node modules, yet I can't import it without runtime errors.
SyntaxError: The requested module 'postgres' does not provide an export named 'PostgresError'
4 replies
TTCTheo's Typesafe Cult
•Created by barry on 11/29/2023 in #questions
Leetcode Geniuses please explain
https://leetcode.com/problems/kids-with-the-greatest-number-of-candies
THIS WORKS, OK?
SOMEHOW THIS DOESN'T WORK WTF!!?
YET THIS WORKS???
3 replies
TTCTheo's Typesafe Cult
•Created by barry on 8/14/2023 in #questions
drizzle many-to-many
https://gist.github.com/barrybtw/f4c54bf7bdac98af34069363d7b1be87
Trying to setup a many-to-many relationship between calendar and user. But I'm getting some weird Typescript errors.
6 replies
TTCTheo's Typesafe Cult
•Created by barry on 8/13/2023 in #questions
Include txt into tsc build
I have a ascii.txt file which I read with fs since formatting it correctly in a ts file is a nightmare
How do I include it in the build
16 replies
TTCTheo's Typesafe Cult
•Created by barry on 8/7/2023 in #questions
Drizzle type question
I swapped over to Drizzle, and I've got this schema right
And I'm trying to get a session based on an id coming from the client
This seems right, right?
But why in the world is the type of session an array consisting of an object with a users and sessions prop?
10 replies
TTCTheo's Typesafe Cult
•Created by barry on 8/5/2023 in #questions
framer motion stuff
So I've got this title thingy
I add some margin to make it move to the side when scrolling which works, but it's obviously very jumpy? It's not smooth moving the whole thing around
2 replies
TTCTheo's Typesafe Cult
•Created by barry on 8/1/2023 in #questions
[possiblo?] i made this garbage code, can you make it better
https://github.com/barrybtw/aktiesparekonto/blob/master/lib/calculate.ts
just lets me know how much money i'd have after x years, how much is profit, how much will be paid in tax, the code is ugly as hell but i dont think it can get better, but maybe someone in here is the einstein of coding and maths
1 replies
TTCTheo's Typesafe Cult
•Created by barry on 7/28/2023 in #questions
[shadcn/ui] hydration error with labels not being directed right?
4 replies
TTCTheo's Typesafe Cult
•Created by barry on 7/28/2023 in #questions
[SHADCN/UI] Form Input add symbol
5 replies
TTCTheo's Typesafe Cult
•Created by barry on 7/28/2023 in #questions
[SHADCN/UI] Toaster Hydration Issues...
7 replies
TTCTheo's Typesafe Cult
•Created by barry on 3/26/2023 in #questions
tRPC cookies
Anyone know how to set a cookie with trpc?
6 replies
TTCTheo's Typesafe Cult
•Created by barry on 1/4/2023 in #questions
School project, modeling
So basically I've tasked myself with making an it solution to Dunder Mifflin, and one of the things I need to do is a project where employees can keep track of stock, here it's ofc. paper, but like how would I model storing paper like 1 row for each paper, 1 row for each pallet, 1 table, like wtf idk why but I hate my own idea now lol, I'm just going to use sqlite for this shit
12 replies
TTCTheo's Typesafe Cult
•Created by barry on 11/15/2022 in #questions
File sending on form submit
So I'm trying to make a mutation, and that should generate a txt file and send back to the user. So far I have this
2 replies
TTCTheo's Typesafe Cult
•Created by barry on 10/12/2022 in #questions
[solved] pnpm being annoying on my potato
8 replies