Skip to content

Commit

Permalink
refactor: use the CALCOM_ENV constant
Browse files Browse the repository at this point in the history
  • Loading branch information
mhetreayush committed May 7, 2024
1 parent 7eb2dfe commit 6c939c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/features/ee/workflows/pages/workflow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { z } from "zod";

import Shell from "@calcom/features/shell/Shell";
import { classNames } from "@calcom/lib";
import { SENDER_ID } from "@calcom/lib/constants";
import { CALCOM_ENV, SENDER_ID } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { useParamsWithFallback } from "@calcom/lib/hooks/useParamsWithFallback";
import { HttpError } from "@calcom/lib/http-error";
Expand Down Expand Up @@ -48,6 +48,8 @@ export function onlyLettersNumbersSpaces(str: string) {
return false;
}

const IS_DEV = CALCOM_ENV === "development";

const formSchema = z.object({
name: z.string(),
activeOn: z.object({ value: z.string(), label: z.string() }).array(),
Expand Down Expand Up @@ -277,7 +279,7 @@ function WorkflowPage() {
}
hideHeadingOnMobile
heading={
(process.env.NODE_ENV === "development" || session.data?.hasValidLicense) &&
(IS_DEV || session.data?.hasValidLicense) &&
isAllDataLoaded && (
<div className="flex">
<div className={classNames(workflow && !workflow.name ? "text-muted" : "")}>
Expand Down

0 comments on commit 6c939c1

Please sign in to comment.