mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 12:43:11 +10:00
InboxPage: ensure currentUser
This commit is contained in:
parent
467377027b
commit
647222d065
1 changed files with 3 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ import {
|
|||
propTypes,
|
||||
} from '../../util/types';
|
||||
import { formatMoney } from '../../util/currency';
|
||||
import { userDisplayName } from '../../util/data';
|
||||
import { ensureCurrentUser, userDisplayName } from '../../util/data';
|
||||
import { daysBetween } from '../../util/dates';
|
||||
import { getMarketplaceEntities } from '../../ducks/marketplaceData.duck';
|
||||
import { isScrollingDisabled } from '../../ducks/UI.duck';
|
||||
|
|
@ -253,6 +253,7 @@ export const InboxPageComponent = props => {
|
|||
transactions,
|
||||
} = props;
|
||||
const { tab } = params;
|
||||
const ensuredCurrentUser = ensureCurrentUser(currentUser);
|
||||
|
||||
const validTab = tab === 'orders' || tab === 'sales';
|
||||
if (!validTab) {
|
||||
|
|
@ -292,7 +293,7 @@ export const InboxPageComponent = props => {
|
|||
: user.id && tx && tx.length > 0 && tx[0].provider.id.uuid === user.id.uuid;
|
||||
};
|
||||
const hasTransactions =
|
||||
!fetchInProgress && hasOrderOrSaleTransactions(transactions, isOrders, currentUser);
|
||||
!fetchInProgress && hasOrderOrSaleTransactions(transactions, isOrders, ensuredCurrentUser);
|
||||
const pagingLinks =
|
||||
hasTransactions && pagination && pagination.totalPages > 1 ? (
|
||||
<PaginationLinks
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue