import React, { FC, useState } from 'react'; import { getBackendSrv } from '@grafana/runtime'; import { Form, Field, Input, Button, Legend, Container, HorizontalGroup, LinkButton } from '@grafana/ui'; import { getConfig } from 'app/core/config'; import { useAppNotification } from 'app/core/copy/appNotification'; interface EmailDTO { email: string; } export const VerifyEmail: FC = () => { const notifyApp = useAppNotification(); const [emailSent, setEmailSent] = useState(false); const onSubmit = (formModel: EmailDTO) => { getBackendSrv() .post('/api/user/signup', formModel) .then(() => { setEmailSent(true); }) .catch((err) => { const msg = err.data?.message || err; notifyApp.warning(msg); }); }; if (emailSent) { return (
An email with a verification link has been sent to the email address. You should receive it shortly.