landscape/sidebar: hide new channel container

The previous write left some padding, preventing users from clicking the
bottom channel in a long sidebar for no reason.
This commit is contained in:
Matilde Park 2020-11-02 15:40:40 -05:00
parent e78767f6ab
commit 3902996798

View File

@ -97,10 +97,6 @@ export function Sidebar(props: SidebarProps) {
const role = props.groups?.[groupPath] ? roleForShip(props.groups[groupPath], window.ship) : undefined;
const isAdmin = (role === "admin") || (workspace?.type === 'home');
const newStyle = {
display: isAdmin ? "block" : "none"
};
return (
<Col
display={display}
@ -142,7 +138,7 @@ export function Sidebar(props: SidebarProps) {
<SidebarStickySpacer flexShrink={0} />
<Box
flexShrink="0"
display="flex"
display={isAdmin ? "flex" : "none"}
justifyContent="center"
position="sticky"
bottom={"8px"}
@ -151,7 +147,6 @@ export function Sidebar(props: SidebarProps) {
py="2"
>
<Link
style={newStyle}
to={!!groupPath ? `/~landscape${groupPath}/new` : `/~landscape/home/new`}
>
<Box