Skip to content

Commit

Permalink
new page for get-started
Browse files Browse the repository at this point in the history
  • Loading branch information
rustyjux committed Jun 5, 2024
1 parent 98a97f2 commit ab31df5
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions src/nextapp/pages/manager/namespaces/get-started.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import GatewayGetStarted from '@/components/gateway-get-started';
import PageHeader from '@/components/page-header';
import { useApi } from '@/shared/services/api';
import {
Container,
Heading
} from '@chakra-ui/react';
import { gql } from 'graphql-request';
import Head from 'next/head';
import React from 'react';

const NamespacesPage: React.FC = () => {
const { data, isSuccess, isError } = useApi(
'allNamespaces',
{ query },
{ suspense: false }
);

return (
<>
<Head>
<title>
API Program Services | My Gateways
</title>
</Head>
<Container maxW="6xl">
<PageHeader title={'My Gateways'} />
<>
{isError && (
<Heading>Gateways Failed to Load</Heading>
)}
{isSuccess && data.allNamespaces.length == 0 && (
<GatewayGetStarted />
)}
</>
</Container>
</>
);
};

export default NamespacesPage;

const query = gql`
query GetNamespaces {
allNamespaces {
name
}
}
`;

0 comments on commit ab31df5

Please sign in to comment.