Lgy
TTCTheo's Typesafe Cult
•Created by Lgy on 3/27/2024 in #questions
Server actions payload limit
How to change payload limit of server actions to something like 16MB?
4 replies
TTCTheo's Typesafe Cult
•Created by Lgy on 5/4/2023 in #questions
app router state management
how do you use redux / zustand in nextjs app router?
2 replies
TTCTheo's Typesafe Cult
•Created by Lgy on 4/16/2023 in #questions
clerk how to implement user roles
What is the best way to implement user roles (let’s say admin and user) and authorization based on them (to keep it simple let’s say admin can change anyone’s role while user can’t change anything)?
7 replies
TTCTheo's Typesafe Cult
•Created by Lgy on 2/11/2023 in #questions
how to do page transitions when using router.push
i tried using framer motion and animate presence is very good when using Link,however i am using amazon cognito and have a login page where i want to redirect user back to homepage when cognito onSuccess is triggered and i am doing that with router.push
5 replies
TTCTheo's Typesafe Cult
•Created by Lgy on 1/26/2023 in #questions
How can i make static array from react query
i have db with table teams, teams have field coins , i want to fetch teams and create an array of them that is sorted by coins but i dont want it to update , so if i have a team with 10 coins and team with 20 coins ,i want the team with 10 coins to be first in array always even if team with 20 coins spends everything
1 replies
TTCTheo's Typesafe Cult
•Created by Lgy on 1/17/2023 in #questions
is refetching every second a bad idea?
I am creating an auction app,users fire mutation on click that writes current bid in db but in order to synchronize changes on every client I have set the query that gets that data on refetchinterval 1000,expected use case is about 50 users for around 1 hour,should I maybe do that some other way ?
12 replies
TTCTheo's Typesafe Cult
•Created by Lgy on 1/14/2023 in #questions
how to add user role to session.user and conditionally render something based on role
I made a new router called userRouter that is enabled when there is a session but the issue is it takes a full second before the condition user.role === something turns from undefined to true
2 replies
TTCTheo's Typesafe Cult
•Created by Lgy on 1/3/2023 in #questions
how to use react query in component that takes id and you render it multiple times
i created a component that fetches data from api and i gave it id as parameter that i use in react query then i render 5 components with different ids and they all end up rendering like they had first id
1 replies
TTCTheo's Typesafe Cult
•Created by Lgy on 12/30/2022 in #questions
nextauth lock account to device
Is it possible to create auth with next auth so user can’t login to any devices other than the one he initially logged in ?
1 replies
TTCTheo's Typesafe Cult
•Created by Lgy on 12/9/2022 in #questions
trpc with third party api
is it possible to use trpc with rest api like jsonplaceholder?
5 replies