Skip to content

Commit

Permalink
chore(refactor): switch to react email
Browse files Browse the repository at this point in the history
  • Loading branch information
enijar committed Nov 16, 2024
1 parent 868e2c3 commit 5364bd9
Show file tree
Hide file tree
Showing 9 changed files with 2,949 additions and 2,459 deletions.
5 changes: 0 additions & 5 deletions server/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,5 @@ DATABASE_STORAGE=.cache/database.sqlite

JWT_SECRET=secret

EMAIL_PREVIEW=true
EMAIL_SEND=false
EMAIL_FROM=hello@example.com
EMAIL_SMTP_HOST=smtp.sendgrid.net
EMAIL_SMTP_PORT=587
EMAIL_SMTP_USERNAME=apikey
EMAIL_SMTP_PASSWORD=secret
28 changes: 28 additions & 0 deletions server/emails/login.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from "react";
import { Button, Html, Img, Text } from "@react-email/components";
import config from "@/config.js";

type Props = {
loginToken: string;
uuid: string;
};

export default function Login(props: Props) {
return (
<Html lang="en">
<Text>
<Img src={`${config.appUrl}/preview.png`} alt="All the Streams" />
</Text>
<Text>
<Button href={`${config.apiUrl}/api/auth?loginToken=${props.loginToken}&uuid=${props.uuid}`}>
Click here to login
</Button>
</Text>
<Text>
If the link above doesn't work, copy/paste this into your browser URL bar:
<br />
{`${config.apiUrl}/api/auth?loginToken=${props.loginToken}&uuid=${props.uuid}`}
</Text>
</Html>
);
}
26 changes: 0 additions & 26 deletions server/emails/login/html.ejs

This file was deleted.

Loading

0 comments on commit 5364bd9

Please sign in to comment.