From 3059b4a938853a0ef71115fb8b57e42e211b64d4 Mon Sep 17 00:00:00 2001 From: Shashank Jarmale Date: Fri, 9 Jan 2026 15:17:13 -0800 Subject: [PATCH] Remove usage of `deprecatedRouteProps` for `Broadcasts` route --- static/gsAdmin/routes.tsx | 1 - static/gsAdmin/views/broadcasts.spec.tsx | 14 +------------- static/gsAdmin/views/broadcasts.tsx | 8 +------- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/static/gsAdmin/routes.tsx b/static/gsAdmin/routes.tsx index 3e219eafad45e7..743c49901f001d 100644 --- a/static/gsAdmin/routes.tsx +++ b/static/gsAdmin/routes.tsx @@ -70,7 +70,6 @@ function buildRoutes() { { index: true, component: Broadcasts, - deprecatedRouteProps: true, }, { path: ':broadcastId/', diff --git a/static/gsAdmin/views/broadcasts.spec.tsx b/static/gsAdmin/views/broadcasts.spec.tsx index 1c42e85543085f..72e841e4e5ceff 100644 --- a/static/gsAdmin/views/broadcasts.spec.tsx +++ b/static/gsAdmin/views/broadcasts.spec.tsx @@ -1,7 +1,6 @@ import {ConfigFixture} from 'sentry-fixture/config'; import {UserFixture} from 'sentry-fixture/user'; -import {initializeOrg} from 'sentry-test/initializeOrg'; import { render, renderGlobalModal, @@ -28,8 +27,6 @@ describe('Broadcasts', () => { }); it('renders', async () => { - const {router} = initializeOrg(); - ConfigStore.loadInitialData( ConfigFixture({ user: mockUser, @@ -38,16 +35,7 @@ describe('Broadcasts', () => { renderMockRequests(); - render( - - ); + render(); renderGlobalModal(); diff --git a/static/gsAdmin/views/broadcasts.tsx b/static/gsAdmin/views/broadcasts.tsx index 21e7c0a9fe92ae..5b3cf1dd8e549f 100644 --- a/static/gsAdmin/views/broadcasts.tsx +++ b/static/gsAdmin/views/broadcasts.tsx @@ -5,15 +5,12 @@ import {openModal} from 'sentry/actionCreators/modal'; import {Button} from 'sentry/components/core/button'; import {Link} from 'sentry/components/core/link'; import ConfigStore from 'sentry/stores/configStore'; -import type {RouteComponentProps} from 'sentry/types/legacyReactRouter'; import {CreateBroadcastModal} from 'admin/components/createBroadcastModal'; import PageHeader from 'admin/components/pageHeader'; import ResultGrid from 'admin/components/resultGrid'; import {getBroadcastSchema} from 'admin/schemas/broadcasts'; -type Props = RouteComponentProps; - const getRow = (row: any) => [ @@ -38,7 +35,7 @@ const getRow = (row: any) => [ , ]; -function Broadcasts(props: Props) { +export default function Broadcasts() { const hasPermission = ConfigStore.get('user').permissions.has('broadcasts.admin'); const fields = getBroadcastSchema(); @@ -91,10 +88,7 @@ function Broadcasts(props: Props) { ['expires', 'Date Expires'], ]} defaultSort="created" - {...props} /> ); } - -export default Broadcasts;