feat: Allow disabling collection creation for members (#3270)
This commit is contained in:
@@ -21,6 +21,10 @@ function SidebarAction({ action, ...rest }: Props) {
|
||||
const menuItem = actionToMenuItem(action, context);
|
||||
invariant(menuItem.type === "button", "passed action must be a button");
|
||||
|
||||
if (!menuItem.visible) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<SidebarLink
|
||||
onClick={menuItem.onClick}
|
||||
|
||||
Reference in New Issue
Block a user