{ isActivityHeaderVisible && (
) }
{ ( isResolving || isBatchUpdating ) && (
) }
{ ! isResolving &&
! isBatchUpdating &&
renderNotes( {
hasNotes,
isBatchUpdating,
lastRead,
notes,
} ) }
);
};
export default compose(
withSelect( ( select ) => {
const {
getNotes,
getNotesError,
isResolving,
isNotesRequesting,
} = select( NOTES_STORE_NAME );
const inboxQuery = {
page: 1,
per_page: QUERY_DEFAULTS.pageSize,
status: 'unactioned',
type: QUERY_DEFAULTS.noteTypes,
orderby: 'date',
order: 'desc',
_fields: [
'id',
'name',
'title',
'content',
'type',
'status',
'actions',
'date_created',
'date_created_gmt',
'layout',
'image',
'is_deleted',
],
};
return {
notes: getNotes( inboxQuery ),
isError: Boolean( getNotesError( 'getNotes', [ inboxQuery ] ) ),
isResolving: isResolving( 'getNotes', [ inboxQuery ] ),
isUpdatingNote: isNotesRequesting( 'updateNote' ),
isBatchUpdating: isNotesRequesting( 'batchUpdateNotes' ),
};
} )
)( InboxPanel );