From f4293f0fd3f30678d80157e87fdb4113a3934ad4 Mon Sep 17 00:00:00 2001 From: Russell Vinegar Date: Thu, 20 Jun 2024 13:26:43 -0700 Subject: [PATCH] show banner if gateways on Get Started --- .../pages/manager/gateways/get-started.tsx | 44 +++++++++++++++---- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/src/nextapp/pages/manager/gateways/get-started.tsx b/src/nextapp/pages/manager/gateways/get-started.tsx index aba2b9377..804df86fb 100644 --- a/src/nextapp/pages/manager/gateways/get-started.tsx +++ b/src/nextapp/pages/manager/gateways/get-started.tsx @@ -2,9 +2,15 @@ import GatewayGetStarted from '@/components/gateway-get-started'; import PageHeader from '@/components/page-header'; import { useApi } from '@/shared/services/api'; import { + Box, Container, - Heading + Flex, + Icon, + Heading, + Link, + Text } from '@chakra-ui/react'; +import { FaInfoCircle } from 'react-icons/fa'; import { gql } from 'graphql-request'; import Head from 'next/head'; import React from 'react'; @@ -13,7 +19,11 @@ const NamespacesPage: React.FC = () => { const { data, isSuccess, isError } = useApi( 'allNamespaces', { query }, - { suspense: false } + { + suspense: false, + refetchOnWindowFocus: true, + refetchOnReconnect: true, + } ); return ( @@ -23,15 +33,33 @@ const NamespacesPage: React.FC = () => { API Program Services | My Gateways + {isError && ( + Gateways Failed to Load + )} + {(isSuccess && data.allNamespaces.length != 0) && ( + + + + + + + You have gateways. Visit the{' '} + My Gateways page + {' '}to manage them. + + + + + + )} <> - {isError && ( - Gateways Failed to Load - )} - {(isSuccess && data.allNamespaces.length != 0) && ( - Gateways Found! - )}