fix: workspace setting validation (#5654)
This commit is contained in:
parent
22b32fd5c6
commit
3c1779b287
1 changed files with 32 additions and 32 deletions
|
|
@ -43,7 +43,7 @@ export const SidebarWorkspaceMenu = observer(() => {
|
|||
const { setValue: toggleWorkspaceMenu, storedValue } = useLocalStorage<boolean>("is_workspace_menu_open", true);
|
||||
// derived values
|
||||
const isWorkspaceMenuOpen = !!storedValue;
|
||||
const isAdmin = allowPermissions([EUserPermissions.ADMIN, EUserPermissions.MEMBER], EUserPermissionsLevel.WORKSPACE);
|
||||
const isAdmin = allowPermissions([EUserPermissions.ADMIN], EUserPermissionsLevel.WORKSPACE);
|
||||
|
||||
const handleLinkClick = (itemKey: string) => {
|
||||
if (window.innerWidth < 768) {
|
||||
|
|
@ -84,7 +84,6 @@ export const SidebarWorkspaceMenu = observer(() => {
|
|||
>
|
||||
<span>WORKSPACE</span>
|
||||
</Disclosure.Button>
|
||||
{isAdmin && (
|
||||
<CustomMenu
|
||||
customButton={
|
||||
<span
|
||||
|
|
@ -115,6 +114,7 @@ export const SidebarWorkspaceMenu = observer(() => {
|
|||
</Link>
|
||||
</CustomMenu.MenuItem>
|
||||
|
||||
{isAdmin && (
|
||||
<CustomMenu.MenuItem>
|
||||
<Link href={`/${workspaceSlug}/settings`}>
|
||||
<div className="flex items-center justify-start gap-2">
|
||||
|
|
@ -123,8 +123,8 @@ export const SidebarWorkspaceMenu = observer(() => {
|
|||
</div>
|
||||
</Link>
|
||||
</CustomMenu.MenuItem>
|
||||
</CustomMenu>
|
||||
)}
|
||||
</CustomMenu>
|
||||
<Disclosure.Button
|
||||
as="button"
|
||||
className="sticky top-0 z-10 group/workspace-button px-0.5 py-1.5 flex items-center justify-between gap-1 text-custom-sidebar-text-400 hover:bg-custom-sidebar-background-90 rounded text-xs font-semibold"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue