Skip to content
Open
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
File renamed without changes
File renamed without changes
File renamed without changes
3 changes: 1 addition & 2 deletions src/app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Image from 'next/image';
import Link from 'next/link';

import { signInAction } from '@/actions';
import googleIcon from '@/assets/google.svg';
import { Button } from '@/components';
import { Routes } from '@/utils';

Expand Down Expand Up @@ -64,7 +63,7 @@ export default function Page({ searchParams }) {
weight="bold"
type="submit"
>
<Image src={googleIcon} alt="" width={28} height={28} />
<Image src="/google.svg" alt="" width={28} height={28} />
Sign In with Google
</Button>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface Props {
invitedByEmail: string;
}

export const NewUserEmailTemplate = ({
export const FaqmakerInviteUserEmail = ({
company,
username,
invitedByUsername,
Expand All @@ -38,7 +38,7 @@ export const NewUserEmailTemplate = ({
<Container className="mx-auto my-10 max-w-lg rounded-md border border-solid border-neutral-500 p-5">
<Section className="mt-8">
<Img
src={`${process.env.NEXT_PUBLIC_AWS_CLOUDFRONT_URL}/common/faqmaker.png`}
src="/faqmaker.png"
width="48"
height="48"
alt="FAQMaker"
Expand All @@ -48,7 +48,7 @@ export const NewUserEmailTemplate = ({
<Heading className="mx-0 p-0 text-center text-2xl font-normal">
Join <strong>{company}</strong> on <strong>FAQMaker</strong>
</Heading>
<Text>Hello XXX,</Text>
<Text>Hi {username},</Text>
<Text>
<strong>{invitedByUsername}</strong> (
<Link
Expand Down Expand Up @@ -84,4 +84,11 @@ export const NewUserEmailTemplate = ({
);
};

export default NewUserEmailTemplate;
FaqmakerInviteUserEmail.PreviewProps = {
username: 'alanturing',
company: 'Enigma',
invitedByUsername: 'Alan',
invitedByEmail: 'alan.turing@example.com',
} as Props;

export default FaqmakerInviteUserEmail;
69 changes: 64 additions & 5 deletions src/components/emails/Register.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,64 @@
export const RegisterEmailTemplate = () => (
<div>
<h1>Welcome to FAQMaker</h1>
</div>
);
import {
Body,
Button,
Container,
Head,
Html,
Img,
Preview,
Section,
Tailwind,
Text,
} from '@react-email/components';

interface Props {
company: string;
}

export const RegisterEmailTemplate = ({ company }: Props) => {
const previewText = `Join XXX on FAQMaker`;

return (
<Html>
<Head />
<Preview>{previewText}</Preview>
<Tailwind>
<Body className="mx-auto my-auto bg-neutral-100 p-2 font-sans text-base text-neutral-950">
<Container className="mx-auto my-10 max-w-lg rounded-md border border-solid border-neutral-500 p-5">
<Section className="mt-8">
<Img
src="/faqmaker.png"
width="48"
height="48"
alt="FAQMaker"
className="mx-auto my-0"
/>
</Section>
<Text>Hi {company},</Text>
<Text>
Welcome to <strong>FAQMaker</strong>,
</Text>
<Section className="text-center">
<Button
className="w-fit rounded-md bg-neutral-950 px-4 py-2 text-base font-semibold lowercase text-neutral-100"
style={{ fontVariant: 'small-caps' }}
href={`${process.env.NEXTAUTH_URL}/login`}
>
Get Started
</Button>
</Section>
<Section>
<Text>
Best,
<br />
The FAQMaker team
</Text>
</Section>
</Container>
</Body>
</Tailwind>
</Html>
);
};

export default RegisterEmailTemplate;
2 changes: 1 addition & 1 deletion src/components/emails/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './Register';
export * from './NewUser';
export * from './InviteUser';