added suer to p-log, HUB_URL in hub-server, dynamic badges in email

This commit is contained in:
PxlLoewe
2025-03-12 17:44:53 -07:00
parent b1992f64d3
commit b573d7cd5a
11 changed files with 79 additions and 41 deletions

View File

@@ -1,6 +1,7 @@
import * as React from "react";
import { Event, User } from "@repo/db";
import { Html, Button, render } from "@react-email/components";
import { Badge } from "./Badge";
const styles = `
* {
@@ -87,7 +88,7 @@ const Template = ({ event, user }: { user: User; event: Event }) => (
<tr>
<td style={{ textAlign: "center", paddingTop: "30px" }}>
<img
src="http://localhost:3000/mail/var_logo.png"
src={`${process.env.HUB_URL}/mail/var_logo.png`}
alt="Logo"
width="80"
style={{ display: "block", margin: "0 auto" }}
@@ -119,12 +120,9 @@ const Template = ({ event, user }: { user: User; event: Event }) => (
</tr>
<tr>
<td style={{ textAlign: "center", padding: "20px" }}>
<img
src="http://localhost:3000/badges/p-1.png"
alt="Badge"
width="80"
style={{ display: "block", margin: "0 auto" }}
/>
{event.finishedBadges.map((badge) => (
<Badge badge={badge} />
))}
</td>
</tr>
<tr>