{t("visibilityHint")}
+{t("downloadDataDescription")}
+${body}
+ ${btn(url, "View on Epicure")}` + ); +} + export function welcomeHtml(name: string) { return layout( "Welcome to Epicure", diff --git a/apps/web/lib/notifications.ts b/apps/web/lib/notifications.ts index 4a2375b..ed05857 100644 --- a/apps/web/lib/notifications.ts +++ b/apps/web/lib/notifications.ts @@ -1,16 +1,24 @@ -import { db, notifications } from "@epicure/db"; +import { db, notifications, users, recipes, eq } from "@epicure/db"; import { randomUUID } from "crypto"; +import { sendPushNotification } from "./push"; +import { sendEmail, notificationEmailHtml } from "./email"; +import { getMessages, formatMessage } from "./i18n/server"; type NotificationType = "follow" | "comment" | "reply" | "reaction" | "rating" | "mention"; -export async function createNotification(opts: { +type CreateNotificationOpts = { userId: string; type: NotificationType; actorId: string; recipeId?: string; commentId?: string; -}): Promise