51 lines
1.1 KiB
JavaScript
Raw Normal View History

2020-02-19 18:57:07 -05:00
import { Fragment } from 'react'
2020-03-24 23:08:43 -04:00
import { openModal } from '../actions/modal';
2020-02-19 18:57:07 -05:00
import LinkFooter from '../components/link_footer'
import WhoToFollowPanel from '../components/panel/who_to_follow_panel'
import TrendsPanel from '../components/panel/trends_panel'
2020-02-24 16:56:07 -05:00
import DefaultLayout from '../layouts/default_layout'
2020-02-19 18:57:07 -05:00
2020-03-24 23:08:43 -04:00
const mapDispatchToProps = dispatch => ({
onOpenListCreateModal() {
dispatch(openModal('LIST_CREATE'))
},
})
2020-02-19 18:57:07 -05:00
2020-03-24 23:08:43 -04:00
export default
@connect(null, mapDispatchToProps)
class ListsPage extends PureComponent {
static propTypes = {
onOpenListCreateModal: PropTypes.func.isRequired,
2020-02-19 18:57:07 -05:00
}
2020-03-24 23:08:43 -04:00
componentDidMount() {
document.title = 'Lists - Gab'
2020-02-19 18:57:07 -05:00
}
render() {
2020-03-24 23:08:43 -04:00
const { children, onOpenListCreateModal } = this.props
2020-02-19 18:57:07 -05:00
return (
<DefaultLayout
title='Lists'
actions={[
{
2020-02-20 19:57:29 -05:00
icon: 'list-add',
2020-03-24 23:08:43 -04:00
onClick: onOpenListCreateModal
2020-02-19 18:57:07 -05:00
},
]}
layout={(
<Fragment>
<TrendsPanel />
<WhoToFollowPanel />
<LinkFooter />
</Fragment>
)}
showBackBtn
>
{children}
</DefaultLayout>
)
}
}