show group sidebar panel across the site

This commit is contained in:
2458773093 2019-07-22 05:12:59 +03:00
parent 3a59b29fdd
commit aefe5a44f3
4 changed files with 10 additions and 2 deletions

View File

@ -29,6 +29,7 @@ import GroupsPage from 'gabsocial/pages/groups_page';
import GroupPage from 'gabsocial/pages/group_page';
import SearchPage from 'gabsocial/pages/search_page';
import HomePage from 'gabsocial/pages/home_page';
import GroupSidebarPanel from '../groups/sidebar_panel';
import {
Status,
@ -67,6 +68,7 @@ import { previewState as previewVideoState } from './components/video_modal';
// Dummy import, to make sure that <Status /> ends up in the application bundle.
// Without this it ends up in ~8 very commonly used bundles.
import '../../components/status';
import { fetchGroups } from '../../actions/groups';
const messages = defineMessages({
beforeUnload: { id: 'ui.beforeunload', defaultMessage: 'Your draft will be lost if you leave Gab Social.' },
@ -120,12 +122,14 @@ const LAYOUT = {
],
RIGHT: [
// <TrendsPanel />,
<GroupSidebarPanel />
],
},
STATUS: {
TOP: null,
LEFT: null,
RIGHT: [
<GroupSidebarPanel />,
<WhoToFollowPanel />,
// <TrendsPanel />,
<LinkFooter />,
@ -370,6 +374,7 @@ class UI extends React.PureComponent {
if (me) {
this.props.dispatch(expandHomeTimeline());
this.props.dispatch(expandNotifications());
this.props.dispatch(fetchGroups('member'));
setTimeout(() => this.props.dispatch(fetchFilters()), 500);
}

View File

@ -8,7 +8,7 @@ import LinkFooter from '../features/ui/components/link_footer';
import PromoPanel from '../features/ui/components/promo_panel';
import HeaderContainer from '../features/groups/timeline/containers/header_container';
import GroupPanel from '../features/groups/timeline/components/panel';
import { fetchGroup, fetchGroups } from '../actions/groups';
import { fetchGroup } from '../actions/groups';
import GroupSidebarPanel from '../features/groups/sidebar_panel';
const mapStateToProps = (state, { params: { id } }) => ({
@ -28,7 +28,6 @@ class GroupPage extends ImmutablePureComponent {
componentWillMount() {
const { params: { id }, dispatch } = this.props;
dispatch(fetchGroups('member'));
dispatch(fetchGroup(id));
}

View File

@ -7,6 +7,7 @@ import WhoToFollowPanel from '../features/ui/components/who_to_follow_panel';
import LinkFooter from '../features/ui/components/link_footer';
import PromoPanel from '../features/ui/components/promo_panel';
import UserPanel from '../features/ui/components/user_panel';
import GroupSidebarPanel from '../features/groups/sidebar_panel';
const mapStateToProps = state => ({
account: state.getIn(['accounts', me]),
@ -43,6 +44,7 @@ class GroupsPage extends ImmutablePureComponent {
<div className='columns-area__panels__pane columns-area__panels__pane--right'>
<div className='columns-area__panels__pane__inner'>
<WhoToFollowPanel />
<GroupSidebarPanel />
</div>
</div>
</div>

View File

@ -9,6 +9,7 @@ import PromoPanel from '../features/ui/components/promo_panel';
import UserPanel from '../features/ui/components/user_panel';
import ComposeFormContainer from '../features/compose/containers/compose_form_container';
import Avatar from '../components/avatar';
import GroupSidebarPanel from '../features/groups/sidebar_panel';
const mapStateToProps = state => ({
account: state.getIn(['accounts', me]),
@ -48,6 +49,7 @@ class HomePage extends ImmutablePureComponent {
<div className='columns-area__panels__pane columns-area__panels__pane--right'>
<div className='columns-area__panels__pane__inner'>
<WhoToFollowPanel />
<GroupSidebarPanel />
</div>
</div>
</div>