Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed unclickable sequences #440

Merged
merged 4 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/web/components/admin/mails/sequences-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ const SequencesList = ({
(broadcast.emails[0].subject === " "
? "--"
: broadcast.emails[0].subject)}
{type === "sequence" && broadcast.title}
{type === "sequence" &&
(broadcast.title === " "
? "Untitled Sequence"
: broadcast.title)}
</Link>
</td>
<td align="right">
Expand Down
3 changes: 2 additions & 1 deletion apps/web/config/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ export const internal = {
invalid_cloud_storage_settings: "Cloud storage settings are invalid",
domain_not_specified: "Domain is not specified",
default_group_name: "First section",
default_email_broadcast_subject: "New broadcast",
default_email_broadcast_subject: "Untitled broadcast",
default_email_sequence_subject: "First email",
default_email_sequence_name: "Untitled Sequence",
default_email_content:
"<p>Replace this with actual content.</p>\n<p>You can use <b>HTML</b>.</p>\n<p>We also support <a href='https://shopify.github.io/liquid/'>Liquid</a>.</p>\n<br>\n<p>Our mailing address is:</p>\n<p>{{ address }}</p>\n<a href=\"{{ unsubscribe_link}}\">Unsubscribe</a>",
};
2 changes: 1 addition & 1 deletion apps/web/graphql/mails/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export async function createTemplateAndSendMail({
loginLink: `${ctx.address}/login`,
courseName: course.title,
name: course.creatorName || ctx.subdomain.settings.title || "",
hideCourseLitBranding: ctx.subdomain.settings.hideCourseLitBranding,
hideCourseLitBranding: ctx.subdomain.settings?.hideCourseLitBranding,
});

await send({
Expand Down
2 changes: 1 addition & 1 deletion apps/web/graphql/mails/logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export async function createSequence(
domain: ctx.subdomain._id,
type,
status: Constants.sequenceStatus[0],
title: " ",
title: internal.default_email_sequence_name,
creatorId: ctx.user.userId,
emails: [
{
Expand Down
2 changes: 1 addition & 1 deletion apps/web/graphql/users/logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export const inviteCustomer = async (
courseName: course.title,
loginLink: `${ctx.address}/login`,
hideCourseLitBranding:
ctx.subdomain.settings.hideCourseLitBranding,
ctx.subdomain.settings?.hideCourseLitBranding,
});

await send({
Expand Down
2 changes: 1 addition & 1 deletion apps/web/pages/api/auth/code/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default async function handler(
try {
const emailBody = pug.render(MagicCodeEmailTemplate, {
code,
hideCourseLitBranding: domain.settings.hideCourseLitBranding,
hideCourseLitBranding: domain.settings?.hideCourseLitBranding,
});
await send({
to: [sanitizedEmail],
Expand Down
Loading