Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{hasMore ? (
<button>
Load More
</button>
) : (
)}
)}
)
}
export default withRouter(connectInfiniteHits(connectStateResults(SearchResults)))
return _sortBy(Object.keys(conferences), conference => {
return parseInt(conference.replace('-', ''), 10);
});
}
function AddConferenceLink() {
return (
<div>
Add a conference
</div>
);
}
export default connectInfiniteHits(ConferenceList);
onEndReached={onEndReached}
onScroll={() => {
Keyboard.dismiss();
removeSuggestions();
}}
ItemSeparatorComponent={() =>
data={hits}
keyboardShouldPersistTaps={'handled'}
removeClippedSubviews={false}
onEndReached={onEndReached}
onEndReachedThreshold={0.5}
initialNumToRender={10}
contentContainerStyle={styles.list}
keyExtractor={item => `${item.id}`}
renderItem={({ item }) => }
ItemSeparatorComponent={() => }
style={{ maxHeight: 200 }}
/>
);
};
const Hits = connectInfiniteHits(({ hits, hasMore, refine, onPress, currentUser }) => {
const data = hits.filter(item => item.id != currentUser.id);
return
});
const InstantSearchBox = connectSearchBox(
({ refine, currentRefinement, placeholder, style }) => (
));
class Blocking extends React.Component {
static navigationOptions = ({ navigation }) => navigationOptions(navigation, 'Blocking');
key={`${sectionID}-${rowID}`}
style={{
height: adjacentRowHighlighted ? 4 : 1,
backgroundColor: adjacentRowHighlighted ? '#3B5998' : '#CCCCCC',
}}
/>
);
}
Hits.propTypes = {
hits: PropTypes.array.isRequired,
refine: PropTypes.func.isRequired,
hasMore: PropTypes.bool.isRequired,
};
const ConnectedHits = connectInfiniteHits(Hits);
const ConnectedStats = connectStats(({ nbHits }) => (
));
const ConnectedSortBy = connectSortBy(
({ refine, items, currentRefinement }) => {
const icon =
Platform.OS === 'ios' ? (
) : (
}
this.setState({scrolled: true}, () => {
setTimeout(() => {
location.hash = '';
location.hash = hash;
});
});
}
render() {
return null;
}
}
export default connectInfiniteHits(ScrollToConference);
searchResults &&
searchResults.nbHits === 0 && (
<div>
No results have been found for {searchState.query}.
</div>
)
);
const Delimiter = connectStateResults(
({ index, searchResults }) =>
(index + 1) % searchResults.hitsPerPage === 0 ? (
<div data-count="{humanizedNumber(index">
) : null
);
const Hits = connectInfiniteHits(({ hits, hasMore, refine }) => (
<div>
{hits.map((hit, index) => [
,
,
])}
{hasMore && (
<button disabled="{!hasMore}">
Load More
</button>
)}
</div>
));
</div>