Skip to content

Commit

Permalink
Merge branch 'feature/display-name-backend' of https://github.com/bcg…
Browse files Browse the repository at this point in the history
…ov/api-services-portal into feature/display-name-backend
  • Loading branch information
rustyjux committed Jun 4, 2024
2 parents f8e028e + 9c8349b commit d721608
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

mutation UpdateNamespaceDisplayName($displayName: String!) {
updateCurrentNamespaceDisplayName(displayName: $displayName)
}
20 changes: 15 additions & 5 deletions src/nextapp/pages/manager/namespaces/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,27 +168,35 @@ const NamespacesPage: React.FC = () => {
}, [client, mutate, router, toast, user]);
const title = (
<>

{(namespace.isFetching || namespace.isLoading) && (
<Skeleton width="400px" height="20px" mt={4} />
)}
{namespace.isSuccess && !namespace.isFetching && (
<>
<Flex align="center" gridGap={4}>
{namespace.data?.currentNamespace?.displayName}
<EditNamespaceDisplayName data={namespace.data?.currentNamespace} queryKey={queryKey} />
<EditNamespaceDisplayName
data={namespace.data?.currentNamespace}
queryKey={queryKey}
/>
{namespace.data?.currentNamespace?.orgEnabled && (
<Tooltip
hasArrow
label={`${user.namespace} is enabled to publish APIs to the directory`}
>
<Box display="flex">
<Icon as={FaCheckCircle} color="bc-success" boxSize="0.65em" />
<Icon
as={FaCheckCircle}
color="bc-success"
boxSize="0.65em"
/>
</Box>
</Tooltip>
)}
</Flex>
<Text fontSize="xl" pt={1}>{namespace?.data.currentNamespace.name}</Text>
<Text fontSize="xl" pt={1}>
{namespace?.data.currentNamespace?.name}
</Text>
<Flex align="center" mt={4}>
<Text
color={currentOrg.color}
Expand Down Expand Up @@ -245,7 +253,9 @@ const NamespacesPage: React.FC = () => {
<Head>
<title>
API Program Services | Namespaces
{hasNamespace ? ` | ${namespace.data?.currentNamespace?.displayName}` : ''}
{hasNamespace
? ` | ${namespace.data?.currentNamespace?.displayName}`
: ''}
</title>
</Head>
<ApproveBanner />
Expand Down

0 comments on commit d721608

Please sign in to comment.