thescotsmav
TTCTheo's Typesafe Cult
•Created by Balduin on 5/8/2023 in #questions
Turborepo compiling issues
You could also try using
modularizeImports
for the heroicons. Would cut down on the bundle size as well.
https://nextjs.org/docs/architecture/nextjs-compiler#modularize-imports
Edit: Oh, that's one of the things in the issue you linked.12 replies
TTCTheo's Typesafe Cult
•Created by bento on 5/4/2023 in #questions
changing col-span with template literal
^^^^ I was looking for basically this issue to explain a bit better.
7 replies
TTCTheo's Typesafe Cult
•Created by bento on 5/4/2023 in #questions
changing col-span with template literal
Because tailwind can't parse that at compile time. It needs the full class name.
7 replies
TTCTheo's Typesafe Cult
•Created by Otar ✞ on 5/2/2023 in #questions
I got some cart synchronization issues, what would you do?
For the add-to-cart sync, I'd possibly fetch the data with useQuery. By default it would refetch the data when the second tab came back into focus. So the cart would be stale while the tab isn't in focus, but is re-validated once as it's back in focus.
I assume for the second part (
getCartItems
or something) the server is looking up each item by UUID and returning an array of products (titles, prices, number in cart etc.), rather than returning the ID array and having the client walk through the array and fetch the product data?
At this point, if the server found something wasn't there anymore, marked as disabled/deleted would do the cascading delete and probably invalidate any cached pages.7 replies
TTCTheo's Typesafe Cult
•Created by Lopen on 5/1/2023 in #questions
how can i select this object using "."
response.data['CAD-USD']
probably?2 replies
TTCTheo's Typesafe Cult
•Created by binetcauchy on 4/28/2023 in #questions
Similar site on multiple URLs
Could also likely use nextjs middleware to rewrite different domains pointed at the same deployment to folders in
/pages
? Maybe3 replies