diff --git a/frontend/src/components/group/GroupCreateBox.tsx b/frontend/src/components/group/GroupCreateBox.tsx index 01f2896..9698734 100644 --- a/frontend/src/components/group/GroupCreateBox.tsx +++ b/frontend/src/components/group/GroupCreateBox.tsx @@ -147,7 +147,7 @@ export function GroupCreateBox({viewSet, resource}: GroupCreateBoxProps): JSX.El
- {resource ? <>Edit {resource.value.name} : "Create a new group"} + {resource ? <>Edit {resource.value.name} : "Create a new research group"}
diff --git a/frontend/src/components/group/GroupMembersBox.tsx b/frontend/src/components/group/GroupMembersBox.tsx index 282c819..c264a11 100644 --- a/frontend/src/components/group/GroupMembersBox.tsx +++ b/frontend/src/components/group/GroupMembersBox.tsx @@ -1,5 +1,8 @@ -import {Box, Heading, Idiomatic, ListUnordered} from "@steffo/bluelib-react" +import {faUsersCog} from "@fortawesome/free-solid-svg-icons" +import {FontAwesomeIcon} from "@fortawesome/react-fontawesome" +import {Box, Heading, Idiomatic, ListUnordered, UAnnotation} from "@steffo/bluelib-react" import * as React from "react" +import {useAuthorizationContext} from "../../contexts/authorization" import {useCacheContext} from "../../contexts/cache" import {ManagedResource} from "../../hooks/useManagedViewSet" import {SophonResearchGroup} from "../../types/SophonTypes" @@ -11,6 +14,7 @@ export interface GroupMembersBoxProps { export function GroupMembersBox({resource}: GroupMembersBoxProps): JSX.Element | null { + const authorization = useAuthorizationContext() const cache = useCacheContext() if(!cache) { @@ -29,9 +33,11 @@ export function GroupMembersBox({resource}: GroupMembersBoxProps): JSX.Element | return null } + const username = id === authorization?.state.user?.id ? {user.value.username} : user.value.username + return ( - {user.value.username} + {username} ) }) @@ -39,7 +45,7 @@ export function GroupMembersBox({resource}: GroupMembersBoxProps): JSX.Element | return ( - Members of {resource.value.name} + Members of {resource.value.name} {users}