79f1b1242d
## Ticket lbry-desktop 6841 ## Issue If you are already at the homepage and you click the "Home" or "Odysee" logo again, the entire page reloads, causing the whole startup sequence to re-run (lots of fetches). This can be annoying when not intended (e.g. clicked too many times), as startup is slow for some and we also lose non-persistent Redux data (for debugging). I believe the requirement was just to reload the homepage tiles, as they might be showing stale ones after a while. A full reload was the quick-and-easy fix. ## Approach Best not to touch the complicated `ClaimTilesDiscover`, so just clear the search cache key in this scenario. `ClaimTilesDiscover` will then pick this up and perform a new `claim_search`.
32 lines
1.4 KiB
JavaScript
32 lines
1.4 KiB
JavaScript
import { connect } from 'react-redux';
|
|
import { selectActiveChannelStakedLevel } from 'redux/selectors/app';
|
|
import { selectSubscriptions } from 'redux/selectors/subscriptions';
|
|
import { doClearClaimSearch } from 'redux/actions/claims';
|
|
import { doClearPurchasedUriSuccess } from 'redux/actions/file';
|
|
import { selectFollowedTags } from 'redux/selectors/tags';
|
|
import { selectUserVerifiedEmail, selectUser } from 'redux/selectors/user';
|
|
import { selectHomepageData, selectLanguage, selectWildWestDisabled } from 'redux/selectors/settings';
|
|
import { doSignOut } from 'redux/actions/app';
|
|
import { selectUnseenNotificationCount } from 'redux/selectors/notifications';
|
|
import { selectPurchaseUriSuccess } from 'redux/selectors/claims';
|
|
|
|
import SideNavigation from './view';
|
|
|
|
const select = (state) => ({
|
|
subscriptions: selectSubscriptions(state),
|
|
followedTags: selectFollowedTags(state),
|
|
language: selectLanguage(state), // trigger redraw on language change
|
|
email: selectUserVerifiedEmail(state),
|
|
purchaseSuccess: selectPurchaseUriSuccess(state),
|
|
unseenCount: selectUnseenNotificationCount(state),
|
|
user: selectUser(state),
|
|
homepageData: selectHomepageData(state),
|
|
activeChannelStakedLevel: selectActiveChannelStakedLevel(state),
|
|
wildWestDisabled: selectWildWestDisabled(state),
|
|
});
|
|
|
|
export default connect(select, {
|
|
doClearClaimSearch,
|
|
doSignOut,
|
|
doClearPurchasedUriSuccess,
|
|
})(SideNavigation);
|