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

fix: change mailgun api handling #368

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
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
5 changes: 3 additions & 2 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ NEXT_PUBLIC_BASE_URL=http://localhost:3000
NEXT_PUBLIC_SUPABASE_URL=<supabase_url>
NEXT_PUBLIC_SUPABASE_ANON_KEY=<supabase_anon_key>

NEXT_PUBLIC_MAILGUN_DOMAIN = <mailgun_domain>
NEXT_PUBLIC_MAILGUN_API_KEY = <mailgun_api_key>

DATABASE_URL=<database_url>
DIRECT_URL=<direct_url>

NEWSLETTER_URI=<post_endpoint_for_newsletter>

MAILGUN_DOMAIN=<mailgun_domain>
MAILGUN_API_KEY=<mailgun_api_key>
NOTION_DB_ID=<notion_db_id>
NOTION_DB_SECRET=<notion_db_secret>
2 changes: 1 addition & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const text = {
joinUsButton: "Join Our Team",
partnerWithUsTitle: "Partner with us 🤝",
partnerWithUsSubtitle:
"Reach out to us through email or social media! You can also connect with us through launchpad@email.com",
"Reach out to us through email or social media! You can also connect with us through strategy@ubclaunchpad.com",
partnerWithUsButton: "Contact us",
};

Expand Down
2 changes: 0 additions & 2 deletions src/app/portal/admin/forms/[id]/submissions/AnalyticsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"use client";
import { FormChart } from "@/app/portal/admin/forms/[id]/submissions/formDataChart";
import { formContext } from "@/components/layouts/formTabView";
import { getFormAnalytics } from "@/lib/utils/forms/analytics";
import { useContext, useEffect, useState } from "react";
import { ReferenceMap } from "./columns";

export default function AnalyticsPage({
Expand Down
4 changes: 2 additions & 2 deletions src/lib/utils/forms/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ type MailConfig = {
html?: string;
};

const DOMAIN = process.env.MAILGUN_DOMAIN || "mg.ubclaunchpad.com";
const API_KEY = process.env.MAILGUN_API_KEY || "";
const DOMAIN = process.env.NEXT_PUBLIC_MAILGUN_DOMAIN || "mg.ubclaunchpad.com";
const API_KEY = process.env.NEXT_PUBLIC_MAILGUN_API_KEY || "";

const mailgun = new Mailgun(formData);
const mg = mailgun.client({
Expand Down
10 changes: 5 additions & 5 deletions src/pages/contact-us.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import formData from "form-data";
import { Button } from "@/components/primitives/button";
import "../app/globals.css";

const DOMAIN = process.env.MAILGUN_DOMAIN || "mg.ubclaunchpad.com";
const API_KEY = process.env.MAILGUN_API_KEY || "";
const DOMAIN = process.env.NEXT_PUBLIC_MAILGUN_DOMAIN || "mg.ubclaunchpad.com";
const API_KEY = process.env.NEXT_PUBLIC_MAILGUN_API_KEY || "";

const mailgun = new Mailgun(formData);
const mg = mailgun.client({
Expand Down Expand Up @@ -72,22 +72,22 @@ const ContactUs = () => {
<Image
src={"../images/assets/planet1.svg"}
alt={"planet"}
layout={"fill"}
fill={true}
style={{ objectFit: "contain" }}
/>
</div>
<div className={"w-[267px] h-[200px] absolute left-40 bottom-10"}>
<Image
src={"../images/assets/planet2.svg"}
alt={"planet"}
layout={"fill"}
fill={true}
style={{ objectFit: "contain" }}
/>
</div>
<Image
src={"../images/assets/starsBg.svg"}
alt={"planet"}
layout={"fill"}
fill={true}
style={{ objectFit: "contain" }}
/>
</div>
Expand Down