mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
Updating asset_id to camelcase.
This commit is contained in:
@@ -160,7 +160,7 @@ class Embed extends Component {
|
||||
notification={{text: null}}
|
||||
/>
|
||||
<LoadMore
|
||||
asset_id={asset.id}
|
||||
assetId={asset.id}
|
||||
comments={asset.comments}
|
||||
moreComments={asset.commentCount > asset.comments.length}
|
||||
loadMore={this.props.loadMore}/>
|
||||
|
||||
@@ -4,7 +4,7 @@ import translations from 'coral-framework/translations.json';
|
||||
import {Button} from 'coral-ui';
|
||||
const lang = new I18n(translations);
|
||||
|
||||
const loadMoreComments = (asset_id, comments, loadMore) => {
|
||||
const loadMoreComments = (assetId, comments, loadMore) => {
|
||||
|
||||
if (!comments.length) {
|
||||
return;
|
||||
@@ -13,16 +13,16 @@ const loadMoreComments = (asset_id, comments, loadMore) => {
|
||||
loadMore({
|
||||
limit: 10,
|
||||
cursor: comments[comments.length - 1].created_at,
|
||||
asset_id,
|
||||
assetId,
|
||||
sort: 'REVERSE_CHRONOLOGICAL'
|
||||
});
|
||||
};
|
||||
|
||||
const LoadMore = ({asset_id, comments, loadMore, moreComments}) => (
|
||||
const LoadMore = ({assetId, comments, loadMore, moreComments}) => (
|
||||
moreComments
|
||||
? <Button
|
||||
className='coral-load-more'
|
||||
onClick={() => loadMoreComments(asset_id, comments, loadMore)}>
|
||||
onClick={() => loadMoreComments(assetId, comments, loadMore)}>
|
||||
{
|
||||
lang.t('loadMore')
|
||||
}
|
||||
@@ -31,7 +31,7 @@ const LoadMore = ({asset_id, comments, loadMore, moreComments}) => (
|
||||
);
|
||||
|
||||
LoadMore.propTypes = {
|
||||
asset_id: PropTypes.string.isRequired,
|
||||
assetId: PropTypes.string.isRequired,
|
||||
comments: PropTypes.array.isRequired,
|
||||
moreComments: PropTypes.bool.isRequired,
|
||||
loadMore: PropTypes.func.isRequired
|
||||
|
||||
Reference in New Issue
Block a user