Hide automate tab if env is not present or false (#2271)

This commit is contained in:
andrewwallacespeckle
2024-05-18 15:39:32 +02:00
committed by GitHub
parent 58e5fa4511
commit 3f9e274168
@@ -115,6 +115,8 @@ const onInviteAccepted = async (params: { accepted: boolean }) => {
}
const isOwner = computed(() => project.value?.role === Roles.Stream.Owner)
const isAutomateEnabled = useIsAutomateModuleEnabled()
const pageTabItems = computed((): LayoutPageTabItem[] => {
const items: LayoutPageTabItem[] = [
{
@@ -131,7 +133,7 @@ const pageTabItems = computed((): LayoutPageTabItem[] => {
}
]
if (isOwner.value) {
if (isOwner.value && isAutomateEnabled.value) {
items.push({
title: 'Automations',
id: 'automations',