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:
1 parent
13a7ae82e3
commit
04dfff4ebd
2 files changed
+1
-2
No files matched your search
@@ -198,7 +198,6 @@ const NotificationsCreatePage = () => {
|
|||||||
<Controller
|
<Controller
|
||||||
name="address"
|
name="address"
|
||||||
control={control}
|
control={control}
|
||||||
defaultValue={"address" in defaults ? defaults.address : ""}
|
|
||||||
render={({ field, fieldState }) => (
|
render={({ field, fieldState }) => (
|
||||||
<TextField
|
<TextField
|
||||||
{...field}
|
{...field}
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export class TelegramProvider implements INotificationProvider {
|
|||||||
|
|
||||||
if (message.content.incident) {
|
if (message.content.incident) {
|
||||||
lines.push("");
|
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");
|
return lines.join("\n");
|
||||||
|
|||||||
Reference in new issue
Block a user