import { UnsubscribeLink } from "./email-template"; import { EmailTemplate, UnsubscribeLinkProps, WorkspaceEmailProps } from "./types"; import { Body, Button, Container, Html, Preview, Section, Text } from "@react-email/components"; import React from "react"; import dayjs from "dayjs"; import utc from "dayjs/plugin/utc"; import { main } from "./styles"; dayjs.extend(utc); export type ThrottlingStartedEmailProps = { throttled?: number; } & WorkspaceEmailProps & UnsubscribeLinkProps; const ThrottlingStartedEmail: EmailTemplate = props => { const { name, workspaceSlug, throttled, unsubscribeLink } = props; return ( [Action Required] Throttling of Your Jitsu Workspace Events Has Started
🚨 We started throttling events coming into your{" "} Jitsu Workspace {" "} at rate of {throttled}%
👋 Hi {name || "there"}! You’ve been making the most out of Jitsu, and we’re thrilled to see your progress! We wanted to let you know that you’ve{" "} reached 100% of your free event quota {" "} for this month in your Jitsu Workspace. Unfortunately, we had to start dropping events coming into your workspace at a rate of {throttled}%. To restore full event flow and avoid further data loss, we recommend upgrading your plan.
Upgrade now to restore full event flow and ensure uninterrupted service.
Thank you for your continued use of Jitsu! We{"'"}re here to help you manage your data effectively. Best Regards,
Jitsu Team
jitsu.com
{unsubscribeLink && }
); }; ThrottlingStartedEmail.PreviewProps = { name: "John", workspaceSlug: "workspace-slug", workspaceName: "Workspace Name", throttled: 50, unsubscribeLink: "https://example.com/unsubscribe", }; ThrottlingStartedEmail.subject = ({ throttled }) => `🚨[Action Required] Throttling of Your Jitsu Events Has Started at ${throttled}% Rate`; ThrottlingStartedEmail.from = "Jitsu Support "; ThrottlingStartedEmail.replyTo = "Jitsu Support "; ThrottlingStartedEmail.isMarketingEmail = false;