Closed Greenheart closed 2 weeks ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
klimatkollen | ✅ Ready (Inspect) | Visit Preview | May 13, 2024 9:49am |
Good catch! The PillSwitch is now only responsible for rendering the links, which allows the parent component to update link href based on the selected dataset and dataView.
For companies, we don't need dynamic links yet as we only have one view.
Ready for final testing and review :)
High level overview
This PR improves the perceived performance when navigating between data groups (companies vs municipalities), among other bugfixes and improvements related to the routing and data loading. Thanks to improved server side caching, data loads faster too, while using less RAM due to reduced duplication in the cache.
Most important changes
/lista
and/karta
.t
imported fromi18next
instead of importinguseTranslation
fromnext-i18next
and then getting thet
-function viaconst { t } = useTranslation()
.Remaining tasks
companies
andmunicipalities
for every valid combination ofdataGroup
anddataset
, we could cachemunicipalities
andcompanies
separately, and then extend the other cached props. This way, we could reduce RAM usage, and improve performance (since we would get more cache hits for getting the companies + municipalities data).To solve in a future PR: