({ canCreate }: { readonly canCreate: boolean })
| 115 | // --------------------------------------------------------------------------- |
| 116 | |
| 117 | function EmptyIntegrations({ canCreate }: { readonly canCreate: boolean }) { |
| 118 | return ( |
| 119 | <div className="mb-8 flex flex-col items-center justify-center rounded-2xl border border-dashed border-border py-16"> |
| 120 | <div className="mb-4 flex size-12 items-center justify-center rounded-2xl bg-muted text-muted-foreground"> |
| 121 | <PlusIcon className="size-5" /> |
| 122 | </div> |
| 123 | <p className="mb-1 text-[14px] font-medium text-foreground/70">No integrations yet</p> |
| 124 | <p className="mb-5 text-[13px] text-muted-foreground/60"> |
| 125 | {canCreate |
| 126 | ? "Connect an integration to start curating tools." |
| 127 | : "Ask a workspace admin to add an integration."} |
| 128 | </p> |
| 129 | {canCreate ? ( |
| 130 | <Button asChild size="sm" className="gap-1.5"> |
| 131 | <Link |
| 132 | to="/{-$orgSlug}/integrations/browse" |
| 133 | onClick={() => trackEvent("integration_browse_opened", { via: "empty-state" })} |
| 134 | > |
| 135 | <PlusIcon className="size-4" /> |
| 136 | Add an integration |
| 137 | </Link> |
| 138 | </Button> |
| 139 | ) : ( |
| 140 | <WorkspaceAdminHint allowed={false}> |
| 141 | <Button disabled size="sm"> |
| 142 | <PlusIcon className="size-4" /> |
| 143 | Add an integration |
| 144 | </Button> |
| 145 | </WorkspaceAdminHint> |
| 146 | )} |
| 147 | </div> |
| 148 | ); |
| 149 | } |
| 150 | |
| 151 | // --------------------------------------------------------------------------- |
| 152 | // Integration grid — flat list of catalog integrations, click-through to detail |
nothing calls this directly
no test coverage detected