gab-social/app/javascript/gabsocial/pages/basic_page.js

46 lines
918 B
JavaScript
Raw Normal View History

import React from 'react'
import PropTypes from 'prop-types'
2020-04-11 23:29:19 +01:00
import PageTitle from '../features/ui/util/page_title'
2020-05-03 06:22:49 +01:00
import DefaultLayout from '../layouts/default_layout'
import {
LinkFooter,
TrendsBreakingPanel,
UserSuggestionsPanel,
} from '../features/ui/util/async_components'
2020-03-04 03:45:16 +00:00
class BasicPage extends React.PureComponent {
2020-03-04 03:45:16 +00:00
render() {
const {
children,
page,
title,
} = this.props
2020-03-04 03:45:16 +00:00
return (
<DefaultLayout
2020-05-07 06:55:24 +01:00
noComposeButton
2020-04-11 23:29:19 +01:00
showBackBtn
2020-03-04 03:45:16 +00:00
title={title}
page={page}
layout={[
TrendsBreakingPanel,
UserSuggestionsPanel,
LinkFooter,
]}
2020-03-04 03:45:16 +00:00
>
2020-04-11 23:29:19 +01:00
<PageTitle path={title} />
2020-03-04 03:45:16 +00:00
{children}
</DefaultLayout>
)
}
2020-05-03 06:22:49 +01:00
}
BasicPage.propTypes = {
children: PropTypes.node.isRequired,
page: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
}
export default BasicPage