Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

909 B
Raw Blame
import { Trans } from "react-i18next/TransWithoutContext";

import { createEmailI18n } from "../i18n";
import type { EmailChrome } from "../types";
import { Link, Text } from "./styled-components";

export async function PoweredBy({
  chrome,
  locale = "en",
}: {
  chrome: EmailChrome;
  locale?: string;
}) {
  if (chrome.hideAttribution) {
    return null;
  }

  const { t, i18n } = await createEmailI18n(locale);

  return (
    <Text small light={true}>
      <Trans
        t={t}
        i18n={i18n}
        ns="emails"
        i18nKey="common_poweredBy"
        defaults="Powered by <a>{domain}</a>"
        values={{ domain: "Rallly" }}
        components={{
          a: (
            <Link
              color={chrome.primaryColor}
              href="https://rallly.co?utm_source=rallly&utm_medium=email&utm_campaign=powered_by"
            />
          ),
        }}
      />
    </Text>
  );
}