import {withRouter, WithRouterProps} from 'react-router'; import NarrowLayout from 'sentry/components/narrowLayout'; import CreateTeamForm from 'sentry/components/teams/createTeamForm'; import {t} from 'sentry/locale'; import {Organization} from 'sentry/types'; import withOrganization from 'sentry/utils/withOrganization'; import AsyncView from 'sentry/views/asyncView'; type Props = WithRouterProps<{orgId: string}, {}> & { organization: Organization; }; class TeamCreate extends AsyncView { getTitle() { return t('Create Team'); } getEndpoints(): ReturnType { return []; } handleSubmitSuccess = data => { const {orgId} = this.props.params; const redirectUrl = `/settings/${orgId}/teams/${data.slug}/`; this.props.router.push(redirectUrl); }; renderBody() { return (

{t('Create a New Team')}

); } } export {TeamCreate}; export default withRouter(withOrganization(TeamCreate));