gab-social/app/javascript/gabsocial/features/news_view.js
mgabdev 64ea4c5675 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
2020-11-06 23:34:23 -06:00

27 lines
792 B
JavaScript

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