From d71765848cd2adfb910f9618618807e6651d40b4 Mon Sep 17 00:00:00 2001 From: Hariom Balhara Date: Sat, 17 Sep 2022 03:19:04 +0530 Subject: [PATCH] Fix workflows (#4518) Co-authored-by: Leo Giovanetti --- .../features/ee/workflows/pages/v2/index.tsx | 11 +---- .../ee/workflows/pages/v2/workflow.tsx | 41 +++++++------------ 2 files changed, 17 insertions(+), 35 deletions(-) diff --git a/packages/features/ee/workflows/pages/v2/index.tsx b/packages/features/ee/workflows/pages/v2/index.tsx index 0ccfd530db..015665a38a 100644 --- a/packages/features/ee/workflows/pages/v2/index.tsx +++ b/packages/features/ee/workflows/pages/v2/index.tsx @@ -19,9 +19,6 @@ function WorkflowsPage() { const session = useSession(); const router = useRouter(); - const me = useMeQuery(); - const isFreeUser = me.data?.plan === "FREE"; - const { data, isLoading } = trpc.useQuery(["viewer.workflows.list"]); const createMutation = trpc.useMutation("viewer.workflows.createV2", { @@ -47,7 +44,7 @@ function WorkflowsPage() { title={t("workflows")} subtitle={data?.workflows.length ? t("workflows_to_automate_notifications") : ""} CTA={ - session.data?.hasValidLicense && !isFreeUser && data?.workflows && data?.workflows.length > 0 ? ( + session.data?.hasValidLicense && data?.workflows && data?.workflows.length > 0 ? ( - - ) +
+ +
} heading={ session.data?.hasValidLicense && - isAllDataLoaded && - !isFreeUser && ( + isAllDataLoaded && (
{workflow && workflow.name ? workflow.name : "untitled"}
) }> - {isFreeUser ? ( - - ) : ( + {!isError ? ( <> - {!isError ? ( + {isAllDataLoaded ? ( <> - {isAllDataLoaded ? ( - <> - - - ) : ( - - )} + ) : ( - + )} + ) : ( + )}