Fix issues related to search apps, notification duration, and loading icon on the explore page (#6374)

This commit is contained in:
faye1225
2024-07-17 20:24:31 +08:00
committed by GitHub
parent a6dbd26f75
commit 65bc4e0fc0
6 changed files with 59 additions and 28 deletions

View File

@@ -51,9 +51,11 @@ const PermissionSelector = ({ disabled, permission, value, memberList, onChange,
...memberList.filter(member => member.id !== userProfile.id).filter(member => value.includes(member.id)),
].map(member => member.name).join(', ')
}, [userProfile, value, memberList])
const showMe = useMemo(() => {
return userProfile.name.includes(searchKeywords) || userProfile.email.includes(searchKeywords)
}, [searchKeywords, userProfile])
const filteredMemberList = useMemo(() => {
return memberList.filter(member => (member.name.includes(searchKeywords) || member.email.includes(searchKeywords)) && member.id !== userProfile.id && ['owner', 'admin', 'editor', 'dataset_operator'].includes(member.role))
}, [memberList, searchKeywords, userProfile])