creating fullstack dashboard with nextjs
Hey so i have already had this project set up but with react front and nestjs backend github link
I wanted to rewrite it to nextjs and someone recommended me t3-app to create full stack app with nextjs
so here i am asking how to do API in this cause the things it generates is kinda overwhelming for a beginner, can someone point me where to start? should i use tRPC?...
Infer useQuery .data type from TRPC
Hello! I am using a lot of joins in my Prisma/TRPC queries, resulting in some pretty chunky union types being returned, see the attached screenshot for an example.
As you can see useQuery returns a type with a bit of nesting of a bunch of Prisma types. This works great for intellisence when working directly with listings.data, however, if I want to use that type somewhere else (type def for FC props) I need to create a new type just to use it elsewhere. In the screenshot you can see above I have created a type which is exactly the same as the type being returned by useQuery. This is okay, but pretty hard to maintain, if I change the query to return something else, that type is now invalid
Im sure the solution is easy I just cant figure it out. Something like inferredType = typeof listings.data... something like that?...

Invalid URL - next build - Next.js
```TypeError: Failed to parse URL from /api
at new Request (A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\compiled\undici\index.js:2:42773)
at new Request (A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\server\node-polyfill-fetch.js:12:17)
... 3 lines matching cause stack trace ...
at processTicksAndRejections (node:internal/process/task_queues:96:5) {...
how to build an app with next-pwa and push notifications?
Hi, I want to implement push notification on my pwa that used next-pwa library
await TRPC's useQuery
I want to use trpc's useQuery on the server side (in getServerProps)
is it possible to await for data to arrive before returning? i.e.
await api.auth.checkLogin.useQuery()?...shadcn/ui variant typescript error
does anyone know why this is giving me a typescript error (code compiles fine)?
i'm using custom variants of shadcn/ui's badge component like so:
```typescript
const badgeVariants = cva(...
Anyone can help me with this React-Hook-Form problem?
Hi, i'm creating a complex form-system using React-Hook-Form, but my handleSubmit's from RHF are not firing for some reason. I have stripped my code down to the bare minimum, and it's still not functioning, is there something I am missing??
The only thing firing off is the
console.log("submitting..") but the actual data/errors of the form are not.
```
const form = useForm<TFormValues>({...NextAuth Discord Provider Callback Error
My nextauth URL env is the link to my deployed vercel project, but whenever I tried to login on my website using nextauth and discord as a provider, it keeps giving me a callback error

"Backend" framework and bundlers. The heck do I do? 🤯
Hey folks!
I need bigger TS brains to help me out here 👀
Context:
I've started rewriting a 3 yo framework that's currently a single package written in JavaScript, no JSDoc, and with way too many dependencies. The rewrite is 100% in TypeScript and has a monorepo architecture....
Problem with Sanity and Next js
created Sanity project it works great when I fetch but it is not updating in real time is there a thing with Next like special caching stuff. When I useCdn it changes but it is not up to date even if I refresh 10 times. Here is the code:
**import { createClient, groq } from "next-sanity";
export async function getPosts() {...
React components in my contentlayer MDX blog not rendering
I'm wondering what the correct way to import and render custom react components into a contentlayer blog would be. This is my current situation. Attached are pictuers of the mdx code and the page rendering on my local dev server.

Slow load time
Any idea how to block admin page from loading to users because it makes my website slow
Error in tsconfig.json when adding NextAuth
(see image) When adding nextauth package. Any idea why this is showing up?

Errors adding NextAuth
In my next application under "pages/api/auth/[...nextauth].ts" i've tried to import NextAuth with: "import { NextAuth } from 'next-auth';".
The last part of this import appears with a red line as seen in the screenshot within this post. (I have already done "npm install next-auth" & and restarted visual studio) . I have includes a screenshot of my hierachry.
In my tsconfig.json, i have red lines on the following lines: ""moduleResolution": "bundler",...
FastAPI with nextjs pages App
Hey,
I am using the t3 stack and trying to setup a fastapi inside of it as i need it for some ML stuff.
I came across this...
T3 app session works fine locally but doesn't work when deployed on Vercel
Hey! So I have this t3 app I created about a month ago. I've been working on it locally since then, and I have had no issues with the getting the auth and
useSession() and signIn() functionality from Next-Auth.
However, I deployed it to Vercel yesteday, I have been running into an issue where, shortly after a successful sign in (usually after few seconds), the auth seems to stop working all of a sudden, and the call to useSession starts returning empty, effectively logging the user out.
I was hoping someone her has had a similar issue/bug? If yes, please how did you fix it?...Tailwind grid
Hi guys im doing a project with NextJS and Tailwindcss and I want to build a page with images looking like this print from Figma but i am struggling a lot with it. I think it should be done with Grid, can someone help me with this please?

Site like Google Drive to fetch photos for client website
Hello,
My client want a photo gallery in his website and i want to do this dynamic. Do you know a service like Google Drive where you can put photos and his appears in the website via a call api ?...
Github codespaces connecting to supabase
I have a react project that uses supabase. I'm playing around wiht github codespaces. The project runs fine in github codespaces and my supabase instance is running fine but i get this error when I try to run the app:
Access to manifest at 'https://github.dev/pf-signin?id=8xtp2drf&cluster=usw3&name=cautious-goggles-96w4rq47vprh9xgp&port=8100&pb=https%3A%2F%2Fcautious-goggles-96w4rq47vprh9xgp-8100.app.github.dev%2Fauth%2Fpostback%2Ftunnel%3Frd%3D%252Fmanifest.json%26tunnel%3D1' (redirected from 'https://cautious-goggles-96w4rq47vprh9xgp-8100.app.github.dev/manifest.json') from origin 'https://cautious-goggles-96w4rq47vprh9xgp-8100.app.github.dev' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
This happens on a preflight check. (I'm not very familiar with CORS suff)
...