π Added profile images to Top Streaks, Most Streaks, Featured Goals, Just Joined sidebars on home page
β’ Similar to what I did for `posts` and `accounts`, moved API fetch requests for streaks, goals to fetch() instead - major optimisation fix! No more duplicate data requests to the same API for the respective methods for each leaderboard
β’ Used the now standard approach of forEach() and push() for the Top Streaks, Most Streaks, Featured Goals, Just Joined leaderboards
β’ learned that the Strapi object `ctx.state.user.id` is not available in fetch() (and likely aynscData() too)
β’ Retired the old custom API endpoint, and replaced it with `accounts` endpoint instead
β’ Added the v-once directive to randomQ() for the writing prompt, so that it just loads twice instead of 4 times(why was it doing that in the first place?!). Ideally should just load once, but due to using v-if-"isAuthenticated" and v-if-"!isAuthenticated", it renders the !isAuth first before rendering the correct isAuth writing prompt.
Only things left now is to create an `account` when registering on the registration page, and updating the TimezoneSelect component to use the new API endpoint...!
β’ Used the now standard approach of forEach() and push() for the Top Streaks, Most Streaks, Featured Goals, Just Joined leaderboards
β’ learned that the Strapi object `ctx.state.user.id` is not available in fetch() (and likely aynscData() too)
β’ Retired the old custom API endpoint, and replaced it with `accounts` endpoint instead
β’ Added the v-once directive to randomQ() for the writing prompt, so that it just loads twice instead of 4 times(why was it doing that in the first place?!). Ideally should just load once, but due to using v-if-"isAuthenticated" and v-if-"!isAuthenticated", it renders the !isAuth first before rendering the correct isAuth writing prompt.
Only things left now is to create an `account` when registering on the registration page, and updating the TimezoneSelect component to use the new API endpoint...!