Skip to content

Commit

Permalink
Production deployment (#755)
Browse files Browse the repository at this point in the history
**Only merge using a merge commit!**
  • Loading branch information
simonknittel authored May 29, 2024
2 parents 9b133fa + 33232a2 commit a6f15e8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ import { useFormStatus } from "react-dom";
import { FaEnvelope, FaSpinner } from "react-icons/fa";
import Button from "../../_components/Button";

interface Props {
type Props = Readonly<{
className?: string;
children?: ReactNode;
}
}>;

export const RequestConfirmationEmailButton = ({
className,
children,
}: Readonly<Props>) => {
}: Props) => {
const { pending } = useFormStatus();

return (
<Button className={clsx(className)} disabled={pending}>
<Button className={clsx(className)} disabled={pending} type="submit">
{pending ? (
<FaSpinner className="animate-spin flex-none" />
) : (
Expand All @@ -32,7 +32,7 @@ export const RequestConfirmationEmailButton = ({
export const RequestConfirmationEmailLink = ({
className,
children,
}: Readonly<Props>) => {
}: Props) => {
const { pending } = useFormStatus();

return (
Expand All @@ -41,6 +41,7 @@ export const RequestConfirmationEmailLink = ({
"opacity-50 cursor-not-allowed": pending,
})}
disabled={pending}
type="submit"
>
{children}
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export const emailConfirmation = async (
htmlRecipientVariables[htmlMessage.to] = htmlMessage.templateProps;
}

await mg.messages.create("mailgun.simonknittel.de", {
from: "Sinister Incorporated <no-reply@mailgun.simonknittel.de>",
await mg.messages.create("sam-mail.sinister-incorporated.de", {
from: "Sinister Incorporated <no-reply@sam-mail.sinister-incorporated.de>",
to: htmlMessages.map((message) => message.to),
subject: subject,
html: htmlEmail,
Expand All @@ -52,8 +52,8 @@ export const emailConfirmation = async (
// textRecipientVariables[textMessage.to] = textMessage.templateProps;
// }

// await mg.messages.create("mailgun.simonknittel.de", {
// from: "Sinister Incorporated <no-reply@mailgun.simonknittel.de>",
// await mg.messages.create("sam-mail.sinister-incorporated.de", {
// from: "Sinister Incorporated <no-reply@sam-mail.sinister-incorporated.de>",
// to: textMessages.map((message) => message.to),
// subject: subject,
// text: textEmail,
Expand Down

0 comments on commit a6f15e8

Please sign in to comment.