@@ -107,11 +107,21 @@ export default function App() {
107107 if ( ! features . isManagedCloud || ! kapa . websiteId ) return ;
108108
109109 loadScriptIfNotExists ( kapa . websiteId ) ;
110- window . Kapa ( "render" , {
111- onRender : ( ) => window . Kapa ( "open" ) ,
112- } ) ;
113110
114- return ( ) => window . Kapa ( "unmount" ) ;
111+ const kapaInterval = setInterval ( ( ) => {
112+ if ( typeof window . Kapa === "function" ) {
113+ clearInterval ( kapaInterval ) ;
114+ window . Kapa ( "render" ) ;
115+ }
116+ } , 100 ) ;
117+
118+ // Clear interval on unmount to prevent memory leaks
119+ return ( ) => {
120+ clearInterval ( kapaInterval ) ;
121+ if ( typeof window . Kapa === "function" ) {
122+ window . Kapa ( "unmount" ) ;
123+ }
124+ } ;
115125 } , [ features . isManagedCloud , kapa . websiteId ] ) ;
116126
117127 return (
@@ -149,8 +159,9 @@ function loadScriptIfNotExists(websiteId: string) {
149159 "data-website-id" : websiteId ,
150160 "data-project-name" : "Trigger.dev" ,
151161 "data-project-color" : "#ff9900" ,
152- "data-project-logo" : "content.trigger.dev/trigger-logo-triangle.png" ,
162+ "data-project-logo" : "https:// content.trigger.dev/trigger-logo-triangle.png" ,
153163 "data-render-on-load" : "false" ,
164+ "data-button-hide" : "true" ,
154165 } ;
155166
156167 Object . entries ( attributes ) . forEach ( ( [ key , value ] ) => {
0 commit comments