-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
126 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import { | ||
Body, | ||
Button, | ||
Container, | ||
Head, | ||
Heading, | ||
Hr, | ||
Html, | ||
Img, | ||
Link, | ||
Preview, | ||
Section, | ||
Tailwind, | ||
Text, | ||
} from '@react-email/components'; | ||
import * as React from 'react'; | ||
|
||
interface Props { | ||
url: string; | ||
host: string; | ||
} | ||
|
||
export const SignIn = ({ url, host }: Props) => { | ||
const previewText = `Sign in to Chaindesk`; | ||
|
||
return ( | ||
<Html> | ||
<Head /> | ||
<Preview>{previewText}</Preview> | ||
<Tailwind> | ||
<Body className="mx-auto my-auto font-sans bg-white"> | ||
<Container className="border border-solid border-[#eaeaea] rounded my-[40px] mx-auto p-[20px]"> | ||
<Section className="mt-[32px]"> | ||
<Img | ||
src={`https://www.chaindesk.ai/app-logo-icon.png`} | ||
width="60" | ||
height="57" | ||
alt="Your App Name" | ||
className="mx-auto my-0" | ||
/> | ||
</Section> | ||
<Heading className="text-black text-[24px] font-normal text-center p-0 my-[30px] mx-0"> | ||
Sign in to <strong>Chaindesk</strong> | ||
</Heading> | ||
<Text className="text-black text-[14px] text-center leading-[24px]"> | ||
Click the button below to sign in and continue enjoying our | ||
services. | ||
</Text> | ||
<Section className="text-center mt-[32px] mb-[32px]"> | ||
<Button | ||
pX={20} | ||
pY={12} | ||
className="bg-[#000000] rounded text-white text-[12px] font-semibold no-underline text-center" | ||
href={url} | ||
> | ||
Sign In | ||
</Button> | ||
</Section> | ||
<Text className="text-[#666666] text-[12px] leading-[24px] mt-4"> | ||
If you have any issues with signing in, feel free to | ||
<Link href="https://www.chaindesk.ai/help" className="underline"> | ||
{' '} | ||
contact us | ||
</Link> | ||
. | ||
</Text> | ||
<Hr className="border border-solid border-[#eaeaea] my-[26px] mx-0 w-full" /> | ||
<Text className="text-[#666666] text-[12px] leading-[24px]"> | ||
If you were not expecting this sign-in link, you can ignore this | ||
email. If you are concerned about your account s safety, please | ||
reply to this email to get in touch with us. | ||
</Text> | ||
</Container> | ||
</Body> | ||
</Tailwind> | ||
</Html> | ||
); | ||
}; | ||
|
||
export default SignIn; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Theme } from 'next-auth'; | ||
import { SendVerificationRequestParams } from 'next-auth/providers'; | ||
import { createTransport, SentMessageInfo, TransportOptions } from 'nodemailer'; | ||
|
||
import { render, SignIn } from '@chaindesk/emails'; | ||
|
||
async function sendVerificationRequest(params: SendVerificationRequestParams) { | ||
const { identifier, url, provider, theme } = params; | ||
const { host } = new URL(url); | ||
const transport = createTransport(provider.server); | ||
const result: SentMessageInfo = await transport.sendMail({ | ||
to: identifier, | ||
from: provider.from, | ||
subject: `Sign in to ${host}`, | ||
html: render(<SignIn host={host} url={url} />), | ||
text: render(<SignIn host={host} url={url} />, { | ||
plainText: true, | ||
}), | ||
}); | ||
const failed = result?.rejected?.concat(result?.pending)?.filter(Boolean); | ||
if (failed?.length) { | ||
throw new Error(`Email(s) (${failed.join(', ')}) could not be sent`); | ||
} | ||
} | ||
|
||
export default sendVerificationRequest; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1bfa260
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
dashboard – ./
*.chaindesk.ai
*.databerry.ai
dashboard-nu-tawny.vercel.app
databerry.chat
app.chaindesk.ai
databerry.ai
*.chaindesk.chat
www.chaindesk.ai
chaindesk.ai
www.chatbotgpt.ai
chaindesk.chat
www.bestaichatbot.org
www.databerry.ai
app.databerry.ai
dashboard-databerry.vercel.app
bestaichatbot.org
dashboard-git-main-databerry.vercel.app