+
{[...menuItems[0].items, ...menuItems[1].items].find(item => item.key === activeMenu)?.name}
diff --git a/web/app/components/header/account-setting/members-page/operation/index.tsx b/web/app/components/header/account-setting/members-page/operation/index.tsx
index f97dcc7397..7c11ad6e54 100644
--- a/web/app/components/header/account-setting/members-page/operation/index.tsx
+++ b/web/app/components/header/account-setting/members-page/operation/index.tsx
@@ -3,12 +3,12 @@ import { useTranslation } from 'react-i18next'
import { Fragment } from 'react'
import { useContext } from 'use-context-selector'
import { Menu, Transition } from '@headlessui/react'
+import cn from 'classnames'
+import { CheckIcon, ChevronDownIcon } from '@heroicons/react/24/outline'
+import s from './index.module.css'
import type { Member } from '@/models/common'
import { deleteMemberOrCancelInvitation, updateMemberRole } from '@/service/common'
import { ToastContext } from '@/app/components/base/toast'
-import s from './index.module.css'
-import cn from 'classnames'
-import { ChevronDownIcon, CheckIcon } from '@heroicons/react/24/outline'
const itemClassName = `
flex px-3 py-2 cursor-pointer hover:bg-gray-50 rounded-lg
@@ -23,14 +23,14 @@ const itemDescClassName = `
leading-[18px] text-xs text-gray-500 whitespace-nowrap
`
-interface IOperationProps {
+type IOperationProps = {
member: Member
onOperate: () => void
}
const Operation = ({
member,
- onOperate
+ onOperate,
}: IOperationProps) => {
const { t } = useTranslation()
const RoleMap = {
@@ -44,92 +44,94 @@ const Operation = ({
await deleteMemberOrCancelInvitation({ url: `/workspaces/current/members/${member.id}` })
onOperate()
notify({ type: 'success', message: t('common.actionMsg.modifiedSuccessfully') })
- } catch (e) {
-
+ }
+ catch (e) {
+
}
}
const handleUpdateMemberRole = async (role: string) => {
try {
- await updateMemberRole({
+ await updateMemberRole({
url: `/workspaces/current/members/${member.id}/update-role`,
- body: { role }
+ body: { role },
})
onOperate()
notify({ type: 'success', message: t('common.actionMsg.modifiedSuccessfully') })
- } catch (e) {
-
+ }
+ catch (e) {
+
}
}
return (
-