Skip to content

Commit 1ec9963

Browse files
committed
Merge branch 'main' into major-version-bumps
2 parents 6a9b4ad + 846bc04 commit 1ec9963

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/settings/AlertAddressForm.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import { useTelemetry } from "../../../../../../hooks/useTelemetry";
3838
export type Props = {
3939
user: Session["user"];
4040
subscriber: SubscriberRow;
41-
data: SubscriberEmailPreferencesOutput;
41+
data?: SubscriberEmailPreferencesOutput;
4242
enabledFeatureFlags: FeatureFlagName[];
4343
};
4444

@@ -53,8 +53,8 @@ export const AlertAddressForm = (props: Props) => {
5353

5454
// Extract monthly report preference from the right column
5555
const monitorReportAllowed = hasPremium(props.user)
56-
? props.data.monthly_monitor_report
57-
: props.data.monthly_monitor_report_free;
56+
? props.data?.monthly_monitor_report
57+
: props.data?.monthly_monitor_report_free;
5858

5959
// TODO: Deprecate this when monthly report for free users has been created
6060
const canToggleFreeOrPlusMonthlyReport =

src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/settings/panels/SettingsPanelNotifications.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export type SettingsPanelNotificationsProps = {
3030
export type NotificationSettingsProps = {
3131
user: Session["user"];
3232
subscriber: SubscriberRow;
33-
data: SubscriberEmailPreferencesOutput;
33+
data?: SubscriberEmailPreferencesOutput;
3434
};
3535

3636
const EmailCommOption = {
@@ -53,8 +53,8 @@ export const NotificationsSettings = (props: NotificationSettingsProps) => {
5353

5454
// Extract monthly report preference from the right column
5555
const monitorReportAllowed = hasPremium(props.user)
56-
? props.data.monthly_monitor_report
57-
: props.data.monthly_monitor_report_free;
56+
? props.data?.monthly_monitor_report
57+
: props.data?.monthly_monitor_report_free;
5858

5959
const defaultActivateAlertEmail =
6060
typeof breachAlertsEmailsAllowed === "boolean";

0 commit comments

Comments
 (0)