import {useState} from 'react'; import {Alert} from 'sentry/components/alert'; import TextField from 'sentry/components/forms/fields/textField'; import Form from 'sentry/components/forms/form'; import {t, tct} from 'sentry/locale'; import type {AuthConfig} from 'sentry/types/auth'; import {browserHistory} from 'sentry/utils/browserHistory'; type Props = { authConfig: AuthConfig; }; function SsoForm({authConfig}: Props) { const [error, setError] = useState(''); const {serverHostname} = authConfig; return (
{ browserHistory.push({pathname: response.nextUri}); }} onSubmitError={response => { setError(response.responseJSON.detail); }} submitLabel={t('Continue')} footerStyle={{ borderTop: 'none', alignItems: 'center', marginBottom: 0, padding: 0, }} > {error && {error}} acme, example: , })} /> ); } type SlugExampleProps = { hostname: string; slug: string; }; function SlugExample({hostname, slug}: SlugExampleProps) { return ( {hostname}/{slug} ); } export default SsoForm;