feat: Allow disabling collection creation for members (#3270)

This commit is contained in:
Tom Moor
2022-03-24 16:02:50 -07:00
committed by GitHub
parent 53d96d2cb3
commit 6af9246f26
10 changed files with 54 additions and 1 deletions

View File

@@ -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}