fix(notifications): remove redundant defaultValue prop and fix incident URL in telegram provider

- Remove redundant 'defaultValue' prop on Telegram chat ID Controller in create/index.tsx;
  the form already initialises via 'defaultValues: defaults' at the useForm level, making
  the per-Controller prop unnecessary and inconsistent with the reviewer's expectation.
- Fix 'View Incident' URL in telegram.ts: was pointing to the infrastructure details page
  (/infrastructure/:id) instead of the incidents page (/incidents/:id).
This commit is contained in:
LeC-D committed 2026-03-27 14:19:27 -04:00
1 parent 13a7ae82e3
commit 04dfff4ebd
2 files changed
+1 -2

No files matched your search

@@ -198,7 +198,6 @@ const NotificationsCreatePage = () => {
<Controller
name="address"
control={control}
defaultValue={"address" in defaults ? defaults.address : ""}
render={({ field, fieldState }) => (
<TextField
{...field}
@@ -105,7 +105,7 @@ export class TelegramProvider implements INotificationProvider {
if (message.content.incident) {
lines.push("");
lines.push(`<a href="${message.clientHost}/infrastructure/${message.monitor.id}">View Incident</a>`);
lines.push(`<a href="${message.clientHost}/incidents/${message.monitor.id}">View Incident</a>`);
}
return lines.join("\n");