gab-social/app/javascript/gabsocial/pages/shortcuts_page.js
mgabdev 38a4f1ed7f Updated WhoToFollowPanel to be UserSuggestionsPanel and included related, verified
• Updated:
- WhoToFollowPanel to be UserSuggestionsPanel and included related, verified
- All pages, layouts to use new component

• Removed:
- VerifiedAccountsPanel
2020-09-01 11:54:01 -05:00

59 lines
1.4 KiB
JavaScript

import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { defineMessages, injectIntl } from 'react-intl'
import { openModal } from '../actions/modal'
import { MODAL_EDIT_SHORTCUTS } from '../constants'
import PageTitle from '../features/ui/util/page_title'
import DefaultLayout from '../layouts/default_layout'
import {
LinkFooter,
TrendsPanel,
UserSuggestionsPanel,
} from '../features/ui/util/async_components'
class ShortcutsPage extends React.PureComponent {
handleOnOpenEditShortcutsModal = () => {
this.props.dispatch(openModal(MODAL_EDIT_SHORTCUTS))
}
render() {
const { intl, children } = this.props
const title = intl.formatMessage(messages.shortcuts)
return (
<DefaultLayout
title={title}
page='shortcuts'
actions={[
{
icon: 'cog',
onClick: this.handleOnOpenEditShortcutsModal,
},
]}
layout={[
TrendsPanel,
UserSuggestionsPanel,
LinkFooter,
]}
>
<PageTitle path={title} />
{children}
</DefaultLayout>
)
}
}
const messages = defineMessages({
shortcuts: { id: 'shortcuts', defaultMessage: 'Shortcuts' },
})
ShortcutsPage.propTypes = {
children: PropTypes.node.isRequired,
dispatch: PropTypes.func.isRequired,
intl: PropTypes.object.isRequired,
}
export default injectIntl(connect()(ShortcutsPage))