Skip to content

Commit

Permalink
email fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
diboune committed Oct 23, 2024
1 parent ff97ec3 commit 5539655
Show file tree
Hide file tree
Showing 19 changed files with 26 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,14 @@ function CartLine({
<Section className="mb-3">
<Row>
<Column className="mx-0 w-[100px] h-[100px] ">
<Section
className="w-fit border-accent rounded-lg"
style={{ border: "1px solid" }}
>
<Section className="w-fit rounded-lg">
<Img
src={line.thumbnail}
width="100"
height="100px"
style={{ border: "1px solid" }}
alt="Product image"
className=""
className="rounded-lg border-accent"
/>
</Section>
</Column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Tailwind,
Text,
} from "@react-email/components";
import React from "react";
import { arial_font } from "./style";

const getYear = () => {
const date = new Date();
Expand All @@ -32,26 +32,28 @@ export default function Footer() {
<Section className="mx-auto my-10 w-fit text-background ">
<Row>
<Column className="pr-10" align="center">
<Link href="/" className="text-background">
<Link style={arial_font} href="/" className="text-background">
INSTAGRAM
</Link>
</Column>

<Column className="pr-10" align="center">
<Link href="/" className="text-background">
<Link style={arial_font} href="/" className="text-background">
FACEBOOK
</Link>
</Column>
<Column className="pr-0" align="center">
<Link href="/" className="text-background">
<Link style={arial_font} href="/" className="text-background">
LINKEDIN
</Link>
</Column>
</Row>
</Section>

<Section className=" text-center">
<Text className="mb-5">© {year} MUNCHIES</Text>
<Text style={arial_font} className="mb-5">
© {year} MUNCHIES
</Text>
</Section>
</Tailwind>
</Section>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {
Container,
Font,
Head,
Preview,
Section,
Tailwind,
Container,
Font,
Head,
Preview,
Section,
Tailwind,
} from "@react-email/components";
import React from "react";
import Footer from "./footer";
Expand Down Expand Up @@ -32,7 +32,7 @@ export default function Layout({
fontWeight={400}
fontStyle="normal"
/>
</Head>{" "}
</Head>
<Preview>{preview}</Preview>
<Tailwind
config={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const times_font = {
};

export const title = {
times_font,
...times_font,
fontSize: "44px",
fontStyle: "normal",
fontWeight: "400",
Expand All @@ -16,6 +16,7 @@ export const title = {
};

export const titleSmall = {
...arial_font,
fontSize: "40px",
fontStyle: "normal",
fontWeight: "400",
Expand All @@ -24,6 +25,7 @@ export const titleSmall = {
margin: "0",
};
export const body = {
...arial_font,
fontSize: "16px",
fontStyle: "normal",
fontWeight: "400",
Expand All @@ -32,6 +34,7 @@ export const body = {
};

export const bodySmall = {
...arial_font,
fontSize: "14px",
fontStyle: "normal",
fontWeight: "600",
Expand All @@ -40,6 +43,7 @@ export const bodySmall = {
};

export const bodyXSmall = {
...arial_font,
fontSize: "12px",
fontStyle: "normal",
fontWeight: "400",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Resend } from "resend";
export type ReactEmailProps<T> = React.FC<Readonly<T>>;

const companyName = "munchies";
const email = "[email protected]"; // TODO: add domain and change
const email = "[email protected]";

const resend = new Resend(process.env.RESEND_API_KEY);

Expand Down
2 changes: 1 addition & 1 deletion backend/src/subscribers/newsletter-sub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default async function subscribeNewsletterHandler({
if (error) throw new Error("Error subscribing email");

const response = await fetch(
"https://munchies.medusajs.app/admin/email/welcome/" + event.data.id,
"https://munchies.medusajs.app/store/email/welcome/" + event.data.id,
{
method: "POST",
headers: {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/subscribers/order-created.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default async function orderCreatedHandler({
}: SubscriberArgs<{ id: string }>) {
try {
const response = await fetch(
"https://munchies.medusajs.app/admin/email/order-confirmation/" +
"https://munchies.medusajs.app/store/email/order-confirmation/" +
event.data.id,
{
method: "POST",
Expand Down
2 changes: 1 addition & 1 deletion backend/src/subscribers/order-shipped.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default async function orderShippedHandler({
}: SubscriberArgs<{ id: string }>) {
try {
const response = await fetch(
"https://munchies.medusajs.app/admin/email/shipping-confirmation/" +
"https://munchies.medusajs.app/store/email/shipping-confirmation/" +
event.data.id,
{
method: "POST",
Expand Down

0 comments on commit 5539655

Please sign in to comment.