iboughtbed
TTCTheo's Typesafe Cult
•Created by iboughtbed on 4/16/2024 in #questions
Next Auth Drizzle Adapter does not include extra columns (fields)
auth.ts
I have a schema for the user table with username field. When I try to add the username field in the profile callback as initial data for user creation, the Drizzle adapter doesn't include the username field, and instead returns default fields only. Is there a way to fix this?4 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 2/9/2024 in #questions
Recommended approach for handling remote markdown on article website
I'm working on an article website where users with
writer
or admin
role can write markdown and publish their articles for others to view. What libraries should I use.2 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 1/3/2024 in #questions
Any react markdown editors like in GitHub?
I want to have an editor with the functionality and features of the GitHub Issues/Discussions editor with markdown
4 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 1/2/2024 in #questions
next markdown rendering library (NOT MDX) on server
So, I'm making a Q&A and users can ask questions and add markdown to their questions. I was using
next-mdx-remote
to render it, but if user adds any <Component />
to their markdown, it will throw an error when rendering it:
Error: Expected component
Comp to be defined: you likely forgot to import, pass, or provide it.
Is there a way to turn off mdx in next-mdx-remote
, or are there any other libraries to render it on server.
This is exhausting, ngl 😦9 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 11/20/2023 in #questions
Old data dissapears when using useInfiniteQuery
When I visit the page, old data is displayed for a split second then dissapears. How can I fix it?
2 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 11/18/2023 in #questions
Can I use "next-safe-actions" library for queries, with no "use server"? I just need a validation
What will happen if I create an action client
2 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 11/5/2023 in #questions
upstream image response failed: 403
can't access the image on uploadthing
I've added the locahost:3000 to the upoladthing app settings and .env had both secret and app id configured. Uploading works, but can't get the image
2 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 11/4/2023 in #questions
Session is null inside of a server action when calling it from the uploadthing router
/api/uploadthing/core.ts
I'm using the next-safe-actions
When I call the server action inside of a page, the session is not null, but when I try to create the article inside of a uploadthing router the session is null? How I can solve it? Any recommendations?
1 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 11/3/2023 in #questions
Can't access the session inside a server action
using NextAuth and next-safe-actions
2 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 11/3/2023 in #questions
React query initial data
I'm getting an error that initial data type isn't correct
4 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 11/2/2023 in #questions
Have someone implemented pagination with server actions and prisma?
Could you send link if so
2 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 11/2/2023 in #questions
Should I use "use server" directive for database queries
If I remove the directive, it would still be running on server and everything is safe, right?
4 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 10/31/2023 in #questions
Best way to fetch, create and update data in Next.js 13 App router
What is the most typesafe way to fetch or mutate data?
Should I use route handlers to create my own api? Should I use server actions?
Would you recommend using "pingdotgg/zact" for server actions?
I'm just curios but can I use server actions to get data from database?
5 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 10/29/2023 in #questions
Best React (Next.js) PDF libraries?
I'm looking for a good PDF viewer library in Next.js
6 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 7/13/2023 in #questions
Getting data from database with zact
Guys do you know if I can use
zact
library to get data from database?
I only see a mutation funct2 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 7/6/2023 in #questions
What does "profile" function do in OAuth Adapter?
Can someone explain it?
1 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 7/3/2023 in #questions
Problem with adding per-page layout in /pages router using typescript
It throws an error: session "any" type
3 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 6/24/2023 in #questions
Prisma, self relation onDelete, onUpdate behavior
I have a prisma model:
I want to add onDelete: Cascade or onUpdate: Cascade, but it returns an error:
Error validating: A self-relation must have
onDelete
and onUpdate
referential actions set to NoAction
in one of the @relation attributes. (Implicit default onDelete
: SetNull
, and onUpdate
: Cascade
) Read more at https://pris.ly/d/cyclic-referential-actions4 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 6/21/2023 in #questions
How to add a form to "new-user" page after user signed in via provider
7 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 6/19/2023 in #questions
How to create or connect multiple records in prisma?
1 replies