Remove extra div in post sidebar

This commit is contained in:
Zetaphor 2023-06-16 18:56:06 -03:00
parent a03bee512a
commit e13d6145cb
2 changed files with 49 additions and 49 deletions

View file

@ -131,37 +131,39 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
const myUSerInfo = UserService.Instance.myUserInfo;
const { name, actor_id } = this.props.community_view.community;
return (
<div id="sidebarContainer">
<section id="sidebarMain" className="card border-secondary mb-3">
<div className="card-body">
{this.communityTitle()}
{this.props.editable && this.adminButtons()}
{myUSerInfo && this.subscribe()}
{this.canPost && this.createPost()}
{myUSerInfo && this.blockCommunity()}
{!myUSerInfo && (
<div className="alert alert-info" role="alert">
<T
i18nKey="community_not_logged_in_alert"
interpolation={{
community: name,
instance: hostname(actor_id),
}}
>
#<code className="user-select-all">#</code>#
</T>
</div>
)}
</div>
</section>
<section id="sidebarInfo" className="card border-secondary mb-3">
<div className="card-body">
{this.description()}
{this.badges()}
{this.mods()}
</div>
</section>
</div>
<aside className="mb-3">
<div id="sidebarContainer">
<section id="sidebarMain" className="card border-secondary mb-3">
<div className="card-body">
{this.communityTitle()}
{this.props.editable && this.adminButtons()}
{myUSerInfo && this.subscribe()}
{this.canPost && this.createPost()}
{myUSerInfo && this.blockCommunity()}
{!myUSerInfo && (
<div className="alert alert-info" role="alert">
<T
i18nKey="community_not_logged_in_alert"
interpolation={{
community: name,
instance: hostname(actor_id),
}}
>
#<code className="user-select-all">#</code>#
</T>
</div>
)}
</div>
</section>
<section id="sidebarInfo" className="card border-secondary mb-3">
<div className="card-body">
{this.description()}
{this.badges()}
{this.mods()}
</div>
</section>
</div>
</aside>
);
}

View file

@ -548,24 +548,22 @@ export class Post extends Component<any, PostState> {
const res = this.state.postRes;
if (res.state === "success") {
return (
<aside className="mb-3">
<Sidebar
community_view={res.data.community_view}
moderators={res.data.moderators}
admins={this.state.siteRes.admins}
enableNsfw={enableNsfw(this.state.siteRes)}
showIcon
allLanguages={this.state.siteRes.all_languages}
siteLanguages={this.state.siteRes.discussion_languages}
onDeleteCommunity={this.handleDeleteCommunityClick}
onLeaveModTeam={this.handleAddModToCommunity}
onFollowCommunity={this.handleFollow}
onRemoveCommunity={this.handleModRemoveCommunity}
onPurgeCommunity={this.handlePurgeCommunity}
onBlockCommunity={this.handleBlockCommunity}
onEditCommunity={this.handleEditCommunity}
/>
</aside>
<Sidebar
community_view={res.data.community_view}
moderators={res.data.moderators}
admins={this.state.siteRes.admins}
enableNsfw={enableNsfw(this.state.siteRes)}
showIcon
allLanguages={this.state.siteRes.all_languages}
siteLanguages={this.state.siteRes.discussion_languages}
onDeleteCommunity={this.handleDeleteCommunityClick}
onLeaveModTeam={this.handleAddModToCommunity}
onFollowCommunity={this.handleFollow}
onRemoveCommunity={this.handleModRemoveCommunity}
onPurgeCommunity={this.handlePurgeCommunity}
onBlockCommunity={this.handleBlockCommunity}
onEditCommunity={this.handleEditCommunity}
/>
);
}
}