refactor: move env vars to constants file

This commit is contained in:
lucas-neynar
2025-05-05 15:52:38 -07:00
parent 40e40543cd
commit 5f0fd8876a
10 changed files with 47 additions and 39 deletions

View File

@@ -3,8 +3,7 @@ import {
sendNotificationResponseSchema,
} from "@farcaster/frame-sdk";
import { getUserNotificationDetails } from "~/lib/kv";
const appUrl = process.env.NEXT_PUBLIC_URL || "";
import { APP_URL } from "./constants";
type SendFrameNotificationResult =
| {
@@ -38,7 +37,7 @@ export async function sendFrameNotification({
notificationId: crypto.randomUUID(),
title,
body,
targetUrl: appUrl,
targetUrl: APP_URL,
tokens: [notificationDetails.token],
} satisfies SendNotificationRequest),
});