mirror of
https://github.com/docmost/docmost.git
synced 2025-11-18 15:51:10 +10:00
fix: refactor forgot password system (#329)
* refactor forgot password system * ready
This commit is contained in:
@ -1,27 +1,28 @@
|
||||
import { Section, Text } from '@react-email/components';
|
||||
import { Button, Link, Section, Text } from '@react-email/components';
|
||||
import * as React from 'react';
|
||||
import { content, paragraph } from '../css/styles';
|
||||
import { button, content, paragraph } from '../css/styles';
|
||||
import { MailBody } from '../partials/partials';
|
||||
|
||||
interface Props {
|
||||
username: string;
|
||||
code: string;
|
||||
username: string;
|
||||
resetLink: string;
|
||||
}
|
||||
|
||||
export const ForgotPasswordEmail = ({ username, code }: Props) => {
|
||||
return (
|
||||
<MailBody>
|
||||
<Section style={content}>
|
||||
<Text style={paragraph}>Hi {username},</Text>
|
||||
<Text style={paragraph}>
|
||||
The code for resetting your password is: <strong>{code}</strong>.
|
||||
</Text>
|
||||
<Text style={paragraph}>
|
||||
If you did not request a password reset, please ignore this email.
|
||||
</Text>
|
||||
</Section>
|
||||
</MailBody>
|
||||
);
|
||||
}
|
||||
export const ForgotPasswordEmail = ({ username, resetLink }: Props) => {
|
||||
return (
|
||||
<MailBody>
|
||||
<Section style={content}>
|
||||
<Text style={paragraph}>Hi {username},</Text>
|
||||
<Text style={paragraph}>
|
||||
We received a request from you to reset your password.
|
||||
</Text>
|
||||
<Link href={resetLink}> Click here to set a new password</Link>
|
||||
<Text style={paragraph}>
|
||||
If you did not request a password reset, please ignore this email.
|
||||
</Text>
|
||||
</Section>
|
||||
</MailBody>
|
||||
);
|
||||
};
|
||||
|
||||
export default ForgotPasswordEmail;
|
||||
export default ForgotPasswordEmail;
|
||||
|
||||
Reference in New Issue
Block a user