Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion static/gsAdmin/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ function buildRoutes() {
{
index: true,
component: Broadcasts,
deprecatedRouteProps: true,
},
{
path: ':broadcastId/',
Expand Down
14 changes: 1 addition & 13 deletions static/gsAdmin/views/broadcasts.spec.tsx
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -28,8 +27,6 @@ describe('Broadcasts', () => {
});

it('renders', async () => {
const {router} = initializeOrg();

ConfigStore.loadInitialData(
ConfigFixture({
user: mockUser,
Expand All @@ -38,16 +35,7 @@ describe('Broadcasts', () => {

renderMockRequests();

render(
<Broadcasts
location={router.location}
router={router}
params={router.params}
route={router.routes[0]!}
routeParams={router.params}
routes={router.routes}
/>
);
render(<Broadcasts />);

renderGlobalModal();

Expand Down
8 changes: 1 addition & 7 deletions static/gsAdmin/views/broadcasts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<unknown, unknown>;

const getRow = (row: any) => [
<td key="title">
<strong>
Expand All @@ -38,7 +35,7 @@ const getRow = (row: any) => [
</td>,
];

function Broadcasts(props: Props) {
export default function Broadcasts() {
const hasPermission = ConfigStore.get('user').permissions.has('broadcasts.admin');
const fields = getBroadcastSchema();

Expand Down Expand Up @@ -91,10 +88,7 @@ function Broadcasts(props: Props) {
['expires', 'Date Expires'],
]}
defaultSort="created"
{...props}
/>
</div>
);
}

export default Broadcasts;
Loading