Let’s do this:
Note that due to liveview's double remounting the queries fetching for random interests are executed twice. We can improve this by making the top_navigation_bar its own nested liveview, which would save the number of sql queries executed even on navigation to other routes.
We may still have double remounting in the nested liveview (unless we use liveview's async_assigns), but since we can make it sticky, we'll save some sql queries on page navigations
Let’s do this: Note that due to liveview's double remounting the queries fetching for random interests are executed twice. We can improve this by making the top_navigation_bar its own nested liveview, which would save the number of sql queries executed even on navigation to other routes.