tangled
alpha
login
or
join now
openstatus.dev
/
openstatus
5
fork
atom
Openstatus
www.openstatus.dev
5
fork
atom
overview
issues
pulls
pipelines
fix email (#1188)
authored by
Thibault Le Ouay
and committed by
GitHub
1 year ago
a2672bff
204ebf04
+4
-7
3 changed files
expand all
collapse all
unified
split
apps
workflows
src
cron
monitor.ts
packages
emails
emails
monitor-deactivation.tsx
monitor-paused.tsx
-2
apps/workflows/src/cron/monitor.ts
···
202
202
reply_to: "thibault@openstatus.dev",
203
203
204
204
react: MonitorDeactivationEmail({
205
205
-
lastLogin: new Date(),
206
205
deactivateAt: new Date(new Date().setDate(new Date().getDate() + 14)),
207
206
}),
208
207
});
···
240
239
reply_to: "thibault@openstatus.dev",
241
240
242
241
react: MonitorDeactivationEmail({
243
243
-
lastLogin: new Date(workFlowRunTimestamp),
244
242
deactivateAt: new Date(new Date().setDate(new Date().getDate() + 3)),
245
243
}),
246
244
});
+4
-4
packages/emails/emails/monitor-deactivation.tsx
···
14
14
import { styles } from "./_components/styles";
15
15
16
16
export const MonitorDeactivationSchema = z.object({
17
17
-
lastLogin: z.coerce.date(),
17
17
+
// lastLogin: z.coerce.date(),
18
18
deactivateAt: z.coerce.date(),
19
19
});
20
20
···
23
23
>;
24
24
25
25
const MonitorDeactivationEmail = ({
26
26
-
lastLogin,
26
26
+
// lastLogin,
27
27
deactivateAt,
28
28
}: MonitorDeactivationProps) => {
29
29
return (
···
41
41
deactivating monitors for free account if you have not logged in for
42
42
the last 2 months.
43
43
</Text>
44
44
-
<Text>Your last login was {lastLogin.toDateString()}.</Text>
44
44
+
{/* <Text>Your last login was {lastLogin.toDateString()}.</Text> */}
45
45
<Text>
46
46
Your monitor(s) will be deactivated on {deactivateAt.toDateString()}
47
47
.
···
70
70
};
71
71
72
72
MonitorDeactivationEmail.PreviewProps = {
73
73
-
lastLogin: new Date(new Date().setDate(new Date().getDate() - 100)),
73
73
+
// lastLogin: new Date(new Date().setDate(new Date().getDate() - 100)),
74
74
deactivateAt: new Date(new Date().setDate(new Date().getDate() + 7)),
75
75
} satisfies MonitorDeactivationProps;
76
76
-1
packages/emails/emails/monitor-paused.tsx
···
9
9
Preview,
10
10
Text,
11
11
} from "@react-email/components";
12
12
-
import { z } from "zod";
13
12
import { Layout } from "./_components/layout";
14
13
import { styles } from "./_components/styles";
15
14