Benja
DTDrizzle Team
•Created by cadams on 9/12/2024 in #help
error "Cannot read properties of undefined (reading 'endsWith') at defaultForColumn"
Any news here ?
2 replies
TTCTheo's Typesafe Cult
•Created by futurama on 12/26/2023 in #questions
Is there any example of implementation of external API usage?
5 replies
TTCTheo's Typesafe Cult
•Created by Benja on 12/25/2023 in #questions
Web + Mobile + tRPC API
Finally I ended using this Supabase template with turborepo. Though that was only for mobile but it handles multiple client and fits with what I was looking for:
https://github.com/supabase-community/create-t3-turbo
2 replies
TTCTheo's Typesafe Cult
•Created by Tribe on 12/25/2023 in #questions
Adding Supabase to TRPC context
https://github.com/supabase-community/create-t3-turbo
This might help you. Got it working some hours ago with a Supabase project
11 replies
TTCTheo's Typesafe Cult
•Created by Cxstum on 12/26/2023 in #questions
How to implement tracking link in Next Js
There are several tools for tracking user navigations. Mixpanel could be a good option, but there might be better options like that one and even cheaper
2 replies
RRefine
•Created by correct-apricot on 11/29/2022 in #ask-any-question
How to change the label and icon of the default button that goes back to list in Show
Is there a way to go back to the list page but adding query params for example ?
6 replies
TTCTheo's Typesafe Cult
•Created by Benja on 4/23/2023 in #questions
Layout management - T3 Stack - Next.js v13
They explain exactly what we are doing right here:
https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts
24 replies
TTCTheo's Typesafe Cult
•Created by Benja on 4/23/2023 in #questions
Layout management - T3 Stack - Next.js v13
beacuse that comes with the app foldering and on t3 stack version we used it's whitout it. So you can't set a layout.js file for this foldering structure. Thast one of the advantages of using the new Next.js version
24 replies
TTCTheo's Typesafe Cult
•Created by Benja on 4/23/2023 in #questions
Layout management - T3 Stack - Next.js v13
Thats great @FilipN !! I will try it out for sure, thanks for your advice
24 replies
TTCTheo's Typesafe Cult
•Created by Benja on 4/23/2023 in #questions
Layout management - T3 Stack - Next.js v13
Well is not like a pattern itself. Functions are like object variables and you are setting the layout at Component.getLayout and as you are setting this layouts on you components, they are rendering at _app flow to get layout and set it's corresponding children. I guess that's you are asking for
24 replies
TTCTheo's Typesafe Cult
•Created by Benja on 4/23/2023 in #questions
Layout management - T3 Stack - Next.js v13
Sure man! https://github.com/BenjaOliva
24 replies
TTCTheo's Typesafe Cult
•Created by Benja on 4/23/2023 in #questions
Layout management - T3 Stack - Next.js v13
3 - Use it on your dynamic routes! Well here I made the folder
src/pages/admin/[id]
so I can use dynamic ids of business on the admin section line http://myurl.com/admin/123456/dashboard or /table or /users. So for this I created in the folder src/pages/admin/[id]
every section file like dashboard.tsx, table.tsx, users.tsx so it gets on the routing
4 - Section config for layout usage!! This is the important part and what I said it was a bit unconfortable: setting the layout on every section manually. Here is one of the sections with the layout setting:
5 - And thats all !! Maybe if you are doing similar to my project you would like to set a default route to urls like http://myurl.com/admin/123456 because if this folder ( src/pages/admin/[id]
) doesn't have an index.tsx file it will not respond as you would expect. So I made a config at next.config.mjs
to get the flow i wanted like setting the /dashboard section as default when accessing http://myurl.com/admin/[id] directly, here is my approach:
Hope this guide helps you !!24 replies
TTCTheo's Typesafe Cult
•Created by Benja on 4/23/2023 in #questions
Layout management - T3 Stack - Next.js v13
2 - Create your layout! In my case I created the folder layouts at
src/layouts
with a custom layout, but here I give you a basic one so you can try it out
24 replies
TTCTheo's Typesafe Cult
•Created by Benja on 4/23/2023 in #questions
Layout management - T3 Stack - Next.js v13
Sure!! I will share you my files so adapt them to your structure and usage
1 - Config your _app to use the component layout
24 replies
TTCTheo's Typesafe Cult
•Created by Benja on 4/23/2023 in #questions
Layout management - T3 Stack - Next.js v13
Updating this issue:
I implemented the
getLayout
approach and it worked well. Layout doesn't re-render and working great. A bit unconfortable to set manually the layout for all leafs on the directory files but not a big deal. Idk if it will be easy to migrate to further versions with new layout management.24 replies
TTCTheo's Typesafe Cult
•Created by Benja on 4/23/2023 in #questions
Layout management - T3 Stack - Next.js v13
I saw this approach but I dont understand completly how this fits with the folder routing.
For example: I have this foldering
src/pages/admin -- this folder will have all the admin sections I guess like "settings.tsx" so when accesing to "url.com/admin/settings will show that component and if I set the layout there when moving to other section like "url.com/admin/table" wil render the other component and layout again without persistance aka rerendering layout, isn't it ?
24 replies