diff --git a/src/components/common/MuteButton/index.js b/src/components/common/MuteButton/index.js index d8805766..6832f80a 100644 --- a/src/components/common/MuteButton/index.js +++ b/src/components/common/MuteButton/index.js @@ -84,8 +84,8 @@ const MuteButton = (props) => { } const mapStateToProps = (state) => ({ - mutedList: state.profile.get('mutedList'), - mutedListAll: state.profile.get('mutedListAll'), + mutedList: state.profile.get('mutedList')?.toJS ? state.profile.get('mutedList').toJS() : state.profile.get('mutedList'), + mutedListAll: state.profile.get('mutedListAll')?.toJS ? state.profile.get('mutedListAll').toJS() : state.profile.get('mutedListAll'), }) diff --git a/src/components/modals/BlacklistModal/index.js b/src/components/modals/BlacklistModal/index.js index 8a1d0e9b..44a4e5b6 100644 --- a/src/components/modals/BlacklistModal/index.js +++ b/src/components/modals/BlacklistModal/index.js @@ -205,7 +205,7 @@ const mapStateToProps = (state) => ({ theme: state.settings.get('theme'), blacklistModal: state.interfaces.get('blacklistDialog')?.toJS ? state.interfaces.get('blacklistDialog').toJS() : state.interfaces.get('blacklistDialog'), loading: pending(state, 'BLACKLIST_USER_REQUEST') || pending(state, 'UNBLACKLIST_USER_REQUEST'), - blacklistedList: state.profile.get('blacklistedList'), + blacklistedList: state.profile.get('blacklistedList')?.toJS ? state.profile.get('blacklistedList').toJS() : state.profile.get('blacklistedList'), }) const mapDispatchToProps = (dispatch) => ({ diff --git a/src/components/modals/FollowBlacklistsModal/index.js b/src/components/modals/FollowBlacklistsModal/index.js index ee35ef13..d13c59e2 100644 --- a/src/components/modals/FollowBlacklistsModal/index.js +++ b/src/components/modals/FollowBlacklistsModal/index.js @@ -236,7 +236,7 @@ const mapStateToProps = (state) => ({ theme: state.settings.get('theme'), followBlacklistsDialog: state.interfaces.get('followBlacklistsDialog')?.toJS ? state.interfaces.get('followBlacklistsDialog').toJS() : state.interfaces.get('followBlacklistsDialog'), loading: pending(state, 'FOLLOW_BLACKLISTS_REQUEST') || pending(state, 'UNFOLLOW_BLACKLISTS_REQUEST'), - followedBlacklist: state.profile.get('followedBlacklist'), + followedBlacklist: state.profile.get('followedBlacklist')?.toJS ? state.profile.get('followedBlacklist').toJS() : state.profile.get('followedBlacklist'), }) const mapDispatchToProps = (dispatch) => ({ diff --git a/src/components/modals/FollowMutedListModal/index.js b/src/components/modals/FollowMutedListModal/index.js index 5a86e248..632c7769 100644 --- a/src/components/modals/FollowMutedListModal/index.js +++ b/src/components/modals/FollowMutedListModal/index.js @@ -236,7 +236,7 @@ const mapStateToProps = (state) => ({ theme: state.settings.get('theme'), followMutedModal: state.interfaces.get('followMutedListDialog')?.toJS ? state.interfaces.get('followMutedListDialog').toJS() : state.interfaces.get('followMutedListDialog'), loading: pending(state, 'FOLLOW_MUTED_LIST_REQUEST') || pending(state, 'UNFOLLOW_MUTED_LIST_REQUEST'), - followedMutedList: state.profile.get('followedMuted'), + followedMutedList: state.profile.get('followedMuted')?.toJS ? state.profile.get('followedMuted').toJS() : state.profile.get('followedMuted'), }) const mapDispatchToProps = (dispatch) => ({ diff --git a/src/components/modals/HideBuzzModal/index.js b/src/components/modals/HideBuzzModal/index.js index 4232f364..0075da6b 100644 --- a/src/components/modals/HideBuzzModal/index.js +++ b/src/components/modals/HideBuzzModal/index.js @@ -177,7 +177,7 @@ const mapStateToProps = (state) => ({ theme: state.settings.get('theme'), hideBuzzDialog: state.interfaces.get('hideBuzzDialog')?.toJS ? state.interfaces.get('hideBuzzDialog').toJS() : state.interfaces.get('hideBuzzDialog'), loading: pending(state, 'HIDE_BUZZ_REQUEST'), - mutelist: state.auth.get('mutelist'), + mutelist: state.auth.get('mutelist')?.toJS ? state.auth.get('mutelist').toJS() : state.auth.get('mutelist'), }) const mapDispatchToProps = (dispatch) => ({ diff --git a/src/components/modals/MuteModal/index.js b/src/components/modals/MuteModal/index.js index 07809bc4..4c834abb 100644 --- a/src/components/modals/MuteModal/index.js +++ b/src/components/modals/MuteModal/index.js @@ -117,8 +117,12 @@ const MuteModal = (props) => { const { muteSuccessCallback } = muteModal useEffect(() => { + console.log('MuteModal useEffect - muteModal:', muteModal) + console.log('MuteModal useEffect - muteModal type:', typeof muteModal, muteModal?.constructor?.name) + console.log('MuteModal useEffect - has open prop?', muteModal?.hasOwnProperty('open')) if(muteModal && muteModal.hasOwnProperty('open')) { const { open, username } = muteModal + console.log('MuteModal opening - open:', open, 'username:', username) setOpen(open) setUsername(username) if(mutelist.includes(username)) { @@ -250,7 +254,7 @@ const mapStateToProps = (state) => ({ theme: state.settings.get('theme'), muteModal: state.interfaces.get('muteDialogUser')?.toJS ? state.interfaces.get('muteDialogUser').toJS() : state.interfaces.get('muteDialogUser'), loading: pending(state, 'MUTE_USER_REQUEST'), - mutelist: state.auth.get('mutelist'), + mutelist: state.auth.get('mutelist')?.toJS ? state.auth.get('mutelist').toJS() : state.auth.get('mutelist'), }) const mapDispatchToProps = (dispatch) => ({ diff --git a/src/components/pages/Profile/index.js b/src/components/pages/Profile/index.js index ae1caa3f..fa158617 100644 --- a/src/components/pages/Profile/index.js +++ b/src/components/pages/Profile/index.js @@ -370,6 +370,8 @@ const Profile = (props) => { } const openMuteModal = () => { + console.log('openMuteModal called for username:', username) + console.log('openMuteDialog function:', typeof openMuteDialog) openMuteDialog(username) } @@ -978,7 +980,7 @@ const mapStateToProps = (state) => ({ loadingFollow: pending(state, 'FOLLOW_REQUEST') || pending(state, 'UNFOLLOW_REQUEST'), recentFollows: state.posts.get('hasBeenRecentlyFollowed'), recentUnfollows: state.posts.get('hasBeenRecentlyUnfollowed'), - mutelist: state.auth.get('mutelist'), + mutelist: state.auth.get('mutelist')?.toJS ? state.auth.get('mutelist').toJS() : state.auth.get('mutelist'), follows: state.profile.get('following'), }) diff --git a/src/store/interface/reducers.js b/src/store/interface/reducers.js index aeaae02f..a333a2c4 100644 --- a/src/store/interface/reducers.js +++ b/src/store/interface/reducers.js @@ -79,8 +79,10 @@ export const interfaces = (state = defaultState, { type, payload }) => { case SET_BUZZ_CONFIRM_MODAL_STATUS: return state.set('buzzConfirmModalStatus', payload) case OPEN_MUTE_DIALOG: + console.log('OPEN_MUTE_DIALOG reducer - payload:', payload) return state.set('muteDialogUser', { open: true, ...payload }) case CLOSE_MUTE_DIALOG: + console.log('CLOSE_MUTE_DIALOG reducer') return state.set('muteDialogUser', { open: false, username: null }) case OPEN_HIDE_BUZZ_DIALOG: return state.set('hideBuzzDialog', { open: true, ...payload })