MCPcopy Create free account
hub / github.com/ShipSecAI/studio / getPageActions

Function getPageActions

frontend/src/components/layout/AppLayout.tsx:344–366  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

342
343 // Get page-specific actions
344 const getPageActions = () => {
345 if (location.pathname === '/') {
346 return (
347 <Button
348 onClick={() => {
349 if (!canManageWorkflows) return;
350 navigate('/workflows/new');
351 }}
352 size={isMobile ? 'sm' : 'default'}
353 className={cn('gap-2', isMobile && 'h-8 px-3 text-xs')}
354 disabled={!canManageWorkflows}
355 aria-disabled={!canManageWorkflows}
356 >
357 <Plus className={cn('w-4 h-4', isMobile && 'w-3.5 h-3.5')} />
358 <span>
359 New <span className="hidden md:inline">Workflow</span>
360 </span>
361 </Button>
362 );
363 }
364
365 return null;
366 };
367
368 return (
369 <SidebarContext.Provider value={sidebarContextValue}>

Callers 1

AppLayoutFunction · 0.85

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected