Skip to content

Commit c986e51

Browse files
committed
Minor improvements
1 parent ec7ab40 commit c986e51

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

site/src/pages/DeploySettingsPage/NotificationsPage/NotificationsPage.tsx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,19 @@ export const NotificationsPage: FC = () => {
119119
<>
120120
Control delivery methods for notifications on this deployment.
121121
Notifications may be disabled in your{" "}
122-
<Link to="/settings/notifications">profile settings</Link>.
122+
<Link
123+
to="/settings/notifications"
124+
css={(theme) => ({
125+
color: theme.roles.active.fill.outline,
126+
textDecoration: "none",
127+
"&: hover": {
128+
textDecoration: "underline",
129+
},
130+
})}
131+
>
132+
profile settings
133+
</Link>
134+
.
123135
</>
124136
}
125137
layout="fluid"
@@ -178,7 +190,9 @@ const EventsView: FC<EventsViewProps> = ({
178190
templatesByGroup,
179191
}) => {
180192
const isUsingWebhook = availableMethods.includes("webhook");
193+
const isUsingSmpt = availableMethods.includes("smtp");
181194
const webhookEndpoint = notificationsConfig?.webhook.endpoint;
195+
const smtpConfig = notificationsConfig?.email;
182196

183197
return (
184198
<Stack spacing={3}>
@@ -187,6 +201,13 @@ const EventsView: FC<EventsViewProps> = ({
187201
Webhook method is enabled, but the endpoint is not configured.
188202
</Alert>
189203
)}
204+
205+
{isUsingSmpt && !smtpConfig && (
206+
<Alert severity="warning">
207+
SMTP method is enabled, but is not configured.
208+
</Alert>
209+
)}
210+
190211
{Object.entries(templatesByGroup).map(([group, templates]) => (
191212
<Card
192213
key={group}

site/src/testHelpers/storybook.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const withDesktopViewport = (Story: FC) => (
9797

9898
export const withAuthProvider = (Story: FC, { parameters }: StoryContext) => {
9999
if (!parameters.user) {
100-
console.warn("You forgot to add `parameters.user` to your story");
100+
throw new Error("You forgot to add `parameters.user` to your story");
101101
}
102102
// eslint-disable-next-line react-hooks/rules-of-hooks -- decorators are components
103103
const queryClient = useQueryClient();

0 commit comments

Comments
 (0)