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:
mgabdev
2020-11-06 23:34:23 -06:00
parent e3388749f4
commit 64ea4c5675
3 changed files with 96 additions and 215 deletions

View 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