Updated News feature, NewsPage with new design, features
• Updated: - News feature, NewsPage with new design, features • Todo: - Complete functionality in both News, NewsView for mobile and expanding rss feeds, lazy loading
This commit is contained in:
27
app/javascript/gabsocial/features/news_view.js
Normal file
27
app/javascript/gabsocial/features/news_view.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from 'react-redux'
|
||||
import { TRENDS_RSS_SOURCES } from '../constants'
|
||||
import WrappedBundle from './ui/util/wrapped_bundle'
|
||||
import { TrendsRSSPanel } from './ui/util/async_components'
|
||||
import ColumnIndicator from '../components/column_indicator'
|
||||
|
||||
class NewsView extends React.PureComponent {
|
||||
|
||||
render() {
|
||||
const { params: { trendsRSSId } } = this.props
|
||||
console.log("trendsRSSId:", trendsRSSId)
|
||||
const exists = !!TRENDS_RSS_SOURCES.find((block) => block.id === trendsRSSId)
|
||||
|
||||
if (!exists) return <ColumnIndicator type='missing' />
|
||||
|
||||
return (
|
||||
<div className={[_s.d, _s.w100PC].join(' ')}>
|
||||
<WrappedBundle component={TrendsRSSPanel} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default NewsView
|
||||
Reference in New Issue
Block a user