File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed
apps/app/src/app/(app)/[orgId] Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 1+ 'use client' ;
2+
3+ import type { Onboarding } from '@db' ;
4+ import { usePathname } from 'next/navigation' ;
5+ import { OnboardingTracker } from './OnboardingTracker' ;
6+
7+ interface Props {
8+ onboarding : Onboarding ;
9+ }
10+
11+ export function ConditionalOnboardingTracker ( { onboarding } : Props ) {
12+ const pathname = usePathname ( ) ;
13+ const isAutomationRoute = pathname . includes ( '/automation' ) ;
14+
15+ // Don't render the OnboardingTracker if we're on an automation route
16+ if ( isAutomationRoute ) {
17+ return null ;
18+ }
19+
20+ return < OnboardingTracker onboarding = { onboarding } /> ;
21+ }
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ import dynamic from 'next/dynamic';
1111import { cookies , headers } from 'next/headers' ;
1212import { redirect } from 'next/navigation' ;
1313import { Suspense } from 'react' ;
14+ import { ConditionalOnboardingTracker } from './components/ConditionalOnboardingTracker' ;
1415import { DynamicMinHeight } from './components/DynamicMinHeight' ;
15- import { OnboardingTracker } from './components/OnboardingTracker' ;
1616
1717const HotKeys = dynamic ( ( ) => import ( '@/components/hot-keys' ) . then ( ( mod ) => mod . HotKeys ) , {
1818 ssr : true ,
@@ -90,7 +90,7 @@ export default async function Layout({
9090 >
9191 < SidebarProvider initialIsCollapsed = { isCollapsed } >
9292 < AnimatedLayout sidebar = { < Sidebar organization = { organization } /> } isCollapsed = { isCollapsed } >
93- { onboarding ?. triggerJobId && < OnboardingTracker onboarding = { onboarding } /> }
93+ { onboarding ?. triggerJobId && < ConditionalOnboardingTracker onboarding = { onboarding } /> }
9494 < Header organizationId = { organization . id } />
9595 < DynamicMinHeight > { children } </ DynamicMinHeight >
9696 < AssistantSheet />
Original file line number Diff line number Diff line change 65506550 "description" : " Risk category" ,
65516551 "enum" : [
65526552 " customer" ,
6553+ " fraud" ,
65536554 " governance" ,
65546555 " operations" ,
65556556 " other" ,
66936694 "description" : " Risk category" ,
66946695 "enum" : [
66956696 " customer" ,
6697+ " fraud" ,
66966698 " governance" ,
66976699 " operations" ,
66986700 " other" ,
You can’t perform that action at this time.
0 commit comments