From 15d2dd0b3a66a93565331ca62c74f4c3d98adea2 Mon Sep 17 00:00:00 2001 From: Molly Struve Date: Fri, 29 May 2020 09:24:26 -0500 Subject: [PATCH] Remove cached_followed_tag_names From Async User Data (#8148) --- app/controllers/async_info_controller.rb | 1 - app/javascript/packs/readingList.jsx | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/async_info_controller.rb b/app/controllers/async_info_controller.rb index c09e8b83a..967f287ac 100644 --- a/app/controllers/async_info_controller.rb +++ b/app/controllers/async_info_controller.rb @@ -44,7 +44,6 @@ class AsyncInfoController < ApplicationController name: @user.name, username: @user.username, profile_image_90: ProfileImage.new(@user).get(width: 90), - followed_tag_names: @user.cached_followed_tag_names, followed_tags: @user.cached_followed_tags.to_json(only: %i[id name bg_color_hex text_color_hex hotness_score], methods: [:points]), followed_user_ids: @user.cached_following_users_ids, followed_organization_ids: @user.cached_following_organizations_ids, diff --git a/app/javascript/packs/readingList.jsx b/app/javascript/packs/readingList.jsx index 132231dbe..6db40e9b3 100644 --- a/app/javascript/packs/readingList.jsx +++ b/app/javascript/packs/readingList.jsx @@ -4,11 +4,12 @@ import { ReadingList } from '../readingList/readingList'; function loadElement() { getUserDataAndCsrfToken().then(({ currentUser }) => { + const followedTagNames = JSON.parse(currentUser.followed_tags).map(t => t.name); const root = document.getElementById('reading-list'); if (root) { render( , root,