@@ -5,7 +5,13 @@ import { docsBaseURL } from '@/lib/constants';
55import { formatMetric } from '@/lib/format-metric' ;
66import { useChartData } from '@/lib/insights-helpers' ;
77import { cn } from '@/lib/utils' ;
8- import { ChevronDoubleRightIcon , CommandLineIcon , DocumentArrowDownIcon } from '@heroicons/react/24/outline' ;
8+ import {
9+ BoltIcon ,
10+ BookmarkIcon ,
11+ ChevronDoubleRightIcon ,
12+ CommandLineIcon ,
13+ DocumentArrowDownIcon ,
14+ } from '@heroicons/react/24/outline' ;
915import { Component2Icon } from '@radix-ui/react-icons' ;
1016import { EnumStatusCode } from '@wundergraph/cosmo-connect/dist/common/common_pb' ;
1117import { migrateFromApollo } from '@wundergraph/cosmo-connect/dist/platform/v1/platform-PlatformService_connectquery' ;
@@ -38,6 +44,7 @@ import { useMutation } from '@connectrpc/connect-query';
3844import { useCheckUserAccess } from '@/hooks/use-check-user-access' ;
3945import { useWorkspace } from '@/hooks/use-workspace' ;
4046import { useCurrentOrganization } from '@/hooks/use-current-organization' ;
47+ import { useOnboarding } from '@/hooks/use-onboarding' ;
4148
4249// this is required to render a blank line with LineChart
4350const fallbackData = [
@@ -616,6 +623,7 @@ export const FederatedGraphsCards = ({ graphs, refetch }: { graphs?: FederatedGr
616623 const [ token , setToken ] = useState < string | undefined > ( ) ;
617624 const [ isMigrating , setIsMigrating ] = useState ( false ) ;
618625 const checkUserAccess = useCheckUserAccess ( ) ;
626+ const { onboarding, enabled, currentStep } = useOnboarding ( ) ;
619627
620628 useEffect ( ( ) => {
621629 if ( isMigrationSuccess ) {
@@ -624,6 +632,24 @@ export const FederatedGraphsCards = ({ graphs, refetch }: { graphs?: FederatedGr
624632 }
625633 } , [ isMigrationSuccess ] ) ;
626634
635+ if ( enabled && onboarding && onboarding . federatedGraphsCount === 0 ) {
636+ return currentStep !== undefined && ! onboarding . finishedAt ? (
637+ < EmptyState
638+ icon = { < BookmarkIcon /> }
639+ title = "Dive right back in"
640+ description = "Want to finish the onboarding and create your first federated graph?"
641+ actions = { < Link href = { `/onboarding/${ currentStep } ` } > Continue</ Link > }
642+ />
643+ ) : (
644+ < EmptyState
645+ icon = { < BoltIcon /> }
646+ title = "Need help?"
647+ description = "Take a quick 5-minute tour to help you set up your first federated graph"
648+ actions = { < Link href = { `/onboarding/1` } > Start here</ Link > }
649+ />
650+ ) ;
651+ }
652+
627653 if ( ! graphs || graphs . length === 0 )
628654 return (
629655 < Empty
0 commit comments