Skip to content

Commit e9efeba

Browse files
authored
Always show Engine in sidebar regardless of instances (#7929)
1 parent d4a44f5 commit e9efeba

File tree

2 files changed

+7
-24
lines changed

2 files changed

+7
-24
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectSidebarLayout.tsx

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { WalletProductIcon } from "@/icons/WalletProductIcon";
2323
export function ProjectSidebarLayout(props: {
2424
layoutPath: string;
2525
children: React.ReactNode;
26-
hasEngineInstances: boolean;
2726
}) {
2827
return (
2928
<FullWidthSidebarLayout
@@ -110,17 +109,12 @@ export function ProjectSidebarLayout(props: {
110109
icon: LockIcon,
111110
label: "Vault",
112111
},
113-
...(props.hasEngineInstances
114-
? [
115-
{
116-
href: `${props.layoutPath}/engine`,
117-
icon: DatabaseIcon,
118-
label: (
119-
<span className="flex items-center gap-2">Engine</span>
120-
),
121-
},
122-
]
123-
: []),
112+
// linkely want to move this to `team` level eventually
113+
{
114+
href: `${props.layoutPath}/engine`,
115+
icon: DatabaseIcon,
116+
label: "Engine",
117+
},
124118
],
125119
},
126120
]}

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/layout.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { TeamHeaderLoggedIn } from "../../../components/TeamHeader/team-header-l
1212
import { StaffModeNotice } from "../../(team)/_components/StaffModeNotice";
1313
import { ProjectSidebarLayout } from "./components/ProjectSidebarLayout";
1414
import { SaveLastUsedProject } from "./components/SaveLastUsedProject";
15-
import { getEngineInstances } from "./engine/_utils/getEngineInstances";
1615

1716
export default async function ProjectLayout(props: {
1817
children: React.ReactNode;
@@ -56,13 +55,6 @@ export default async function ProjectLayout(props: {
5655
teamId: team.id,
5756
});
5857

59-
const engineInstances = await getEngineInstances({
60-
authToken: authToken,
61-
teamIdOrSlug: project.teamId,
62-
});
63-
64-
const hasEngineInstances = !!engineInstances.data?.length;
65-
6658
const isStaffMode = !teams.some((t) => t.slug === team.slug);
6759

6860
return (
@@ -80,10 +72,7 @@ export default async function ProjectLayout(props: {
8072
teamsAndProjects={teamsAndProjects}
8173
/>
8274
</div>
83-
<ProjectSidebarLayout
84-
layoutPath={layoutPath}
85-
hasEngineInstances={hasEngineInstances}
86-
>
75+
<ProjectSidebarLayout layoutPath={layoutPath}>
8776
{props.children}
8877
</ProjectSidebarLayout>
8978
</div>

0 commit comments

Comments
 (0)