mirror of
https://github.com/urbit/shrub.git
synced 2024-11-24 22:30:45 +03:00
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:
parent
e78767f6ab
commit
3902996798
@ -97,10 +97,6 @@ export function Sidebar(props: SidebarProps) {
|
|||||||
const role = props.groups?.[groupPath] ? roleForShip(props.groups[groupPath], window.ship) : undefined;
|
const role = props.groups?.[groupPath] ? roleForShip(props.groups[groupPath], window.ship) : undefined;
|
||||||
const isAdmin = (role === "admin") || (workspace?.type === 'home');
|
const isAdmin = (role === "admin") || (workspace?.type === 'home');
|
||||||
|
|
||||||
const newStyle = {
|
|
||||||
display: isAdmin ? "block" : "none"
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Col
|
<Col
|
||||||
display={display}
|
display={display}
|
||||||
@ -142,7 +138,7 @@ export function Sidebar(props: SidebarProps) {
|
|||||||
<SidebarStickySpacer flexShrink={0} />
|
<SidebarStickySpacer flexShrink={0} />
|
||||||
<Box
|
<Box
|
||||||
flexShrink="0"
|
flexShrink="0"
|
||||||
display="flex"
|
display={isAdmin ? "flex" : "none"}
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
position="sticky"
|
position="sticky"
|
||||||
bottom={"8px"}
|
bottom={"8px"}
|
||||||
@ -151,7 +147,6 @@ export function Sidebar(props: SidebarProps) {
|
|||||||
py="2"
|
py="2"
|
||||||
>
|
>
|
||||||
<Link
|
<Link
|
||||||
style={newStyle}
|
|
||||||
to={!!groupPath ? `/~landscape${groupPath}/new` : `/~landscape/home/new`}
|
to={!!groupPath ? `/~landscape${groupPath}/new` : `/~landscape/home/new`}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
|
Loading…
Reference in New Issue
Block a user