SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
fix: use pathname to get channel id while saving (#8303)
Yunus M81fcca3bd3f0
diff --git a/frontend/src/container/EditAlertChannels/index.tsx b/frontend/src/container/EditAlertChannels/index.tsxindex d081f82c11..5077e83588 100644--- a/frontend/src/container/EditAlertChannels/index.tsx+++ b/frontend/src/container/EditAlertChannels/index.tsx@@ -28,7 +28,6 @@ import { useNotifications } from 'hooks/useNotifications';import history from 'lib/history';import { useCallback, useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';-import { useParams } from 'react-router-dom';import APIError from 'types/api/error';function EditAlertChannels({@@ -53,7 +52,11 @@ function EditAlertChannels({const [savingState, setSavingState] = useState<boolean>(false);const [testingState, setTestingState] = useState<boolean>(false);const { notifications } = useNotifications();- const { id } = useParams<{ id: string }>();++ // Extract channelId from URL pathname since useParams doesn't work in nested routing+ const { pathname } = window.location;+ const channelIdMatch = pathname.match(/\/settings\/channels\/edit\/([^/]+)/);+ const id = channelIdMatch ? channelIdMatch[1] : '';const [type, setType] = useState<ChannelType>(initialValue?.type ? (initialValue.type as ChannelType) : ChannelType.Slack,