import { FC, useRef } from 'react'; import { UncontrolledTooltip } from 'reactstrap'; import { ExternalLink } from 'react-external-link'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faBan as forbiddenIcon, faCheck as checkIcon, faCircleNotch as loadingStatusIcon, } from '@fortawesome/free-solid-svg-icons'; import { DomainStatus } from '../data'; export const DomainStatusIcon: FC<{ status: DomainStatus }> = ({ status }) => { const ref = useRef(); if (status === 'validating') { return ; } return ( <> { ref.current = el; }} > {status === 'valid' ? : } ref.current) as any} placement="bottom" autohide={status === 'valid'}> {status === 'valid' ? 'Congratulations! This domain is properly configured.' : ( <> Oops! There is some missing configuration, and short URLs shared with this domain will not work.
Follow the documentation in order to find out what is missing. )}
); };