redux fixes (#7400)

This commit is contained in:
jessopb 2022-01-04 13:46:55 -05:00 committed by GitHub
parent ba2caf4eb2
commit 7a100ec022
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View file

@ -251,6 +251,7 @@ const Header = (props: Props) => {
aria-label={__('Home')} aria-label={__('Home')}
className="header__navigation-item header__navigation-item--lbry" className="header__navigation-item header__navigation-item--lbry"
onClick={() => { onClick={() => {
// here use state.router.location.pathname
if (history.location.pathname === '/') window.location.reload(); if (history.location.pathname === '/') window.location.reload();
}} }}
// @if TARGET='app' // @if TARGET='app'

View file

@ -6,7 +6,7 @@ import ModalConfirmTransaction from './view';
import { selectActiveChannelClaim, selectIncognito } from 'redux/selectors/app'; import { selectActiveChannelClaim, selectIncognito } from 'redux/selectors/app';
const select = (state, props) => ({ const select = (state, props) => ({
claim: selectClaimForUri(state, props.destination)(state), claim: selectClaimForUri(state, props.destination),
activeChannelClaim: selectActiveChannelClaim(state), activeChannelClaim: selectActiveChannelClaim(state),
incognito: selectIncognito(state), incognito: selectIncognito(state),
}); });

View file

@ -221,7 +221,7 @@ export function doPlayUri(
export function savePosition(uri: string, position: number) { export function savePosition(uri: string, position: number) {
return (dispatch: Dispatch, getState: () => any) => { return (dispatch: Dispatch, getState: () => any) => {
const state = getState(); const state = getState();
const claim = selectClaimForUri(state, uri)(state); const claim = selectClaimForUri(state, uri);
const { claim_id: claimId, txid, nout } = claim; const { claim_id: claimId, txid, nout } = claim;
const outpoint = `${txid}:${nout}`; const outpoint = `${txid}:${nout}`;