mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
23 lines
630 B
TypeScript
23 lines
630 B
TypeScript
import type {ButtonProps} from 'sentry/components/button';
|
|
import {LinkButton} from 'sentry/components/button';
|
|
import useOrganization from 'sentry/utils/useOrganization';
|
|
import usePageFilters from 'sentry/utils/usePageFilters';
|
|
|
|
export function NewMonitorButton(props: ButtonProps) {
|
|
const organization = useOrganization();
|
|
const {selection} = usePageFilters();
|
|
|
|
return (
|
|
<LinkButton
|
|
to={{
|
|
pathname: `/organizations/${organization.slug}/crons/create/`,
|
|
query: {project: selection.projects},
|
|
}}
|
|
priority="primary"
|
|
{...props}
|
|
>
|
|
{props.children}
|
|
</LinkButton>
|
|
);
|
|
}
|