slavi_lns
Explore posts from serversTTCTheo's Typesafe Cult
•Created by slavi_lns on 5/2/2023 in #questions
tRPC - fetch params
Hello,
how can i pass parameters to the query?
I have tasks that need to be filled directly by an ID coming from a URL address.
const params = useParams() as { id: string };
const tasks = await api.tasks.getProjectTasks.fetch();
export const tasksRouter = createTRPCRouter({
getProjectTasks: protectedProcedure.query(({ ctx: { auth, db } }) => {
const data = db
.select()
.from(tasks)
.where(eq(project.id......))
.limit(5)
.orderBy(desc(tasks.createdAt));
return data;
}),
5 replies
TTCTheo's Typesafe Cult
•Created by slavi_lns on 4/22/2023 in #questions
Amazon s3 alternative?
Can anyone suggest me an alternative to store user files?
I have not used other products and would be happy to look at alternatives. In the spirit of T3
9 replies
TTCTheo's Typesafe Cult
•Created by slavi_lns on 4/19/2023 in #questions
T3-create-app: new update whit: Drizzle/shadcnUI?
Does anyone know if there will be an update to the T3 stack to include:
- drizzle/PlanetScale
- Next.js new App dir
- shadcn UI components
I am about to start my first SaaS project and I will be very happy if I can use T3 for this purpose.
11 replies