Skip to content

Commit dee4830

Browse files
committed
Remove unecessary filters
1 parent df8a5fd commit dee4830

File tree

1 file changed

+31
-39
lines changed

1 file changed

+31
-39
lines changed

site/src/pages/TaskPage/TaskApps.tsx

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -58,24 +58,18 @@ export const TaskApps: FC<TaskAppsProps> = ({ task }) => {
5858
return (
5959
<main className="flex-1 flex flex-col">
6060
<div className="border-0 border-b border-border border-solid w-full p-1 flex gap-2">
61-
{embeddedApps
62-
.filter((app) => !app.external)
63-
.map((app) => (
64-
<TaskAppButton
65-
key={app.id}
66-
task={task}
67-
app={app}
68-
active={app.id === activeAppId}
69-
onClick={(e) => {
70-
if (app.external) {
71-
return;
72-
}
73-
74-
e.preventDefault();
75-
setActiveAppId(app.id);
76-
}}
77-
/>
78-
))}
61+
{embeddedApps.map((app) => (
62+
<TaskAppButton
63+
key={app.id}
64+
task={task}
65+
app={app}
66+
active={app.id === activeAppId}
67+
onClick={(e) => {
68+
e.preventDefault();
69+
setActiveAppId(app.id);
70+
}}
71+
/>
72+
))}
7973

8074
{externalApps.length > 0 && (
8175
<div className="ml-auto">
@@ -87,27 +81,25 @@ export const TaskApps: FC<TaskAppsProps> = ({ task }) => {
8781
</Button>
8882
</DropdownMenuTrigger>
8983
<DropdownMenuContent>
90-
{externalApps
91-
.filter((app) => app.external)
92-
.map((app) => {
93-
const link = useAppLink(app, {
94-
agent,
95-
workspace: task.workspace,
96-
});
97-
98-
return (
99-
<DropdownMenuItem key={app.id} asChild>
100-
<RouterLink to={link.href}>
101-
{app.icon ? (
102-
<ExternalImage src={app.icon} />
103-
) : (
104-
<LayoutGridIcon />
105-
)}
106-
{link.label}
107-
</RouterLink>
108-
</DropdownMenuItem>
109-
);
110-
})}
84+
{externalApps.map((app) => {
85+
const link = useAppLink(app, {
86+
agent,
87+
workspace: task.workspace,
88+
});
89+
90+
return (
91+
<DropdownMenuItem key={app.id} asChild>
92+
<RouterLink to={link.href}>
93+
{app.icon ? (
94+
<ExternalImage src={app.icon} />
95+
) : (
96+
<LayoutGridIcon />
97+
)}
98+
{link.label}
99+
</RouterLink>
100+
</DropdownMenuItem>
101+
);
102+
})}
111103
</DropdownMenuContent>
112104
</DropdownMenu>
113105
</div>

0 commit comments

Comments
 (0)