f4512b4411
- Removed status counting in dashboard for admins - Added limit to notifications to only 7 days ago - Removed ability for non-logged in users to view group, group-collection timelines - Limited account realtime search on compose, list, chat actions - Removed fetching of user suggestions - Removed fetching of shortcuts - Removed featured groups, user suggestions timeline injections - Removed group featured panel from explore layout for non logged in users - Removed media gallery panel from profile layout - Removed lists, suggestions, groups panel from home page - Removed user suggestions to list page - Updated pro_timelie in status.rb to find only from 1 hour ago - Updated home timeline to not include groups and to find only latest from 5 days ago - Removed search for non logged in users
66 lines
1.6 KiB
JavaScript
66 lines
1.6 KiB
JavaScript
import React from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import { connect } from 'react-redux'
|
|
import ImmutablePureComponent from 'react-immutable-pure-component'
|
|
import ImmutablePropTypes from 'react-immutable-proptypes'
|
|
import { fetchShortcuts } from '../actions/shortcuts'
|
|
import ColumnIndicator from '../components/column_indicator'
|
|
import List from '../components/list'
|
|
|
|
class Shortcuts extends ImmutablePureComponent {
|
|
|
|
componentDidMount() {
|
|
// this.props.onFetchShortcuts()
|
|
}
|
|
|
|
render() {
|
|
const {
|
|
isLoading,
|
|
isError,
|
|
shortcuts,
|
|
} = this.props
|
|
|
|
return null
|
|
|
|
if (isError) {
|
|
return <ColumnIndicator type='error' message='Error fetching shortcuts' />
|
|
}
|
|
|
|
const listItems = shortcuts.map((s) => ({
|
|
to: s.get('to'),
|
|
title: s.get('title'),
|
|
image: s.get('image'),
|
|
}))
|
|
|
|
return (
|
|
<List
|
|
scrollKey='shortcuts'
|
|
emptyMessage='You have no shortcuts'
|
|
items={listItems}
|
|
showLoading={isLoading}
|
|
/>
|
|
)
|
|
}
|
|
|
|
}
|
|
|
|
const mapStateToProps = (state) => ({
|
|
isError: state.getIn(['shortcuts', 'isError']),
|
|
isLoading: state.getIn(['shortcuts', 'isLoading']),
|
|
shortcuts: state.getIn(['shortcuts', 'items']),
|
|
})
|
|
|
|
const mapDispatchToProps = (dispatch) => ({
|
|
onFetchShortcuts() {
|
|
dispatch(fetchShortcuts())
|
|
},
|
|
})
|
|
|
|
Shortcuts.propTypes = {
|
|
isLoading: PropTypes.bool.isRequired,
|
|
isError: PropTypes.bool.isRequired,
|
|
onFetchShortcuts: PropTypes.func.isRequired,
|
|
shortcuts: ImmutablePropTypes.list,
|
|
}
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Shortcuts) |