Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/hng 43 implement reset password page without image #227

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions app/components/ResetPasswordEmail.tsx
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use tailwind

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import React from 'react';

interface ResetPasswordEmailProps {
recipientName: string;
resetLink: string;
}

const ResetPasswordEmail: React.FC<ResetPasswordEmailProps> = ({ recipientName, resetLink }) => (
<div style={{
fontFamily: 'Inter, sans-serif',
backgroundColor: '#ffffff',
margin: '0',
padding: '0',
}}>
<div style={{
maxWidth: '600px',
margin: '0 auto',
backgroundColor: '#ffffff',
padding: '20px',
}}>
<div style={{ textAlign: 'center', padding: '20px 0' }}>
<h1 style={{ margin: '0', color: '#0A0A0A', fontSize: '29px', fontWeight: '600' }}>Reset Your Password</h1>
</div>
<div style={{ padding: '20px 0' }}>
<p style={{ margin: '0 0 20px', color: '#111111E5', fontSize: '18px', fontWeight: 600 }}>Hi {recipientName},</p>
<p style={{ margin: '0 0 20px', color: '#111111E5', fontSize: "14px" }}>You recently requested to reset your password. If you did not make this request, you can ignore this email.</p>
<p style={{ margin: '0 0 20px', color: '#111111E5', fontSize: "14px" }}>To reset your password, please click the button below.</p>
<p style={{ textAlign: 'center' }}>
<a href={resetLink} style={{
display: 'inline-block',
padding: '10px 40px',
backgroundColor: '#F97316',
color: '#ffffff',
textDecoration: 'none',
borderRadius: '5px',
fontWeight: '500',
}}>Reset Password</a>
</p>
</div>
<div style={{
padding: '20px 0',
color: '#111111',
fontSize: '14px',
fontWeight: 500
}}>
<p style={{ margin: '0' }}>Regards,</p>
<p style={{ margin: '0' }}>Boilerplate</p>
</div>
</div>
</div>
);

export default ResetPasswordEmail;
25 changes: 25 additions & 0 deletions app/routes/reset-password-email.tsx
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use tailwind

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { LoaderFunction, json } from '@remix-run/node';
import { useLoaderData } from '@remix-run/react';
import ResetPasswordEmail from '../components/ResetPasswordEmail';

interface LoaderData {
recipientName: string;
resetLink: string;
}

export const loader: LoaderFunction = async () => {
const data: LoaderData = {
recipientName: "John Doe",
resetLink: "https://yourwebsite.com/reset-password",
};
return json(data);
};

export default function ResetPasswordEmailRoute() {
const data = useLoaderData<LoaderData>();
return (
<div style={{ padding: "20px" }}>
<ResetPasswordEmail recipientName={data.recipientName} resetLink={data.resetLink} />
</div>
);
}
Loading