@embedreach/components 0.3.27 → 0.3.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/index.js +3 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/chunks/index.js
CHANGED
|
@@ -119135,6 +119135,8 @@ const ChannelDisabledWarning = ({
|
|
|
119135
119135
|
}) => {
|
|
119136
119136
|
const defaultTitle = `${channelType === "email" ? "Email" : "SMS"} Channel Disabled`;
|
|
119137
119137
|
const defaultDescription = `Enable the ${channelType} channel to send messages.`;
|
|
119138
|
+
const automation2 = useAutomation();
|
|
119139
|
+
const canEditAutomation = automation2?.status === AutomationStatus.DRAFT;
|
|
119138
119140
|
return /* @__PURE__ */ jsx("div", { className: "px-4 w-full", children: /* @__PURE__ */ jsx("div", { className: "max-w-2xl mx-auto", children: /* @__PURE__ */ jsx(
|
|
119139
119141
|
"div",
|
|
119140
119142
|
{
|
|
@@ -119162,7 +119164,7 @@ const ChannelDisabledWarning = ({
|
|
|
119162
119164
|
{
|
|
119163
119165
|
size: "sm",
|
|
119164
119166
|
onClick: onEnable,
|
|
119165
|
-
disabled: isEnabling,
|
|
119167
|
+
disabled: isEnabling || !canEditAutomation,
|
|
119166
119168
|
className: "bg-amber-600 hover:bg-amber-700 text-white ml-4 shrink-0",
|
|
119167
119169
|
children: isEnabling ? "Enabling..." : `Enable ${channelType === "email" ? "Email" : "SMS"}`
|
|
119168
119170
|
}
|