Skip to content

Commit

Permalink
Logsnag
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Jan 4, 2024
1 parent 9a99c32 commit 7834edd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const logsnag = new LogSnag({
project: process.env.LOGSNAG_PROJECT!,
});

export async function subscribeEmail(formData: FormData, userGroup: string) {
export async function subscribeAction(formData: FormData, userGroup: string) {
const email = formData.get("email");
const country = await getCountryCode();

Expand Down Expand Up @@ -42,7 +42,8 @@ export async function subscribeEmail(formData: FormData, userGroup: string) {
notify: true,
icon: "⭐",
user_id: email?.toString(),
properties: {
channel: "waitlist",
tags: {
email: email?.toString(),
},
});
Expand Down
4 changes: 2 additions & 2 deletions apps/website/src/components/startpage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { subscribeEmail } from "@/actions/subscribeEmail";
import { subscribeAction } from "@/actions/subscribe-action";
import { useScopedI18n } from "@/locales/client";
import { Icons } from "@midday/ui/icons";
import { Loader2 } from "lucide-react";
Expand Down Expand Up @@ -80,8 +80,8 @@ export function StartPage() {
) : (
<form
action={async (formData) => {
await subscribeEmail(formData, "pre-launch");
setSubmitted(true);
await subscribeAction(formData, "pre-launch");

setTimeout(() => {
setSubmitted(false);
Expand Down

0 comments on commit 7834edd

Please sign in to comment.