Actual in-progress-connect overlay (#4047)

This commit is contained in:
Jaco Greeff 2020-11-19 09:32:19 +01:00 committed by GitHub
parent c10533112f
commit a3752f389a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

View File

@ -90,7 +90,7 @@ export default React.memo(styled(BaseOverlay)(({ theme }: ThemeProps) => `
display: flex;
margin: 0 auto;
max-width: 50rem;
padding: 1em;
padding: 1em 3rem 1em;
position: relative;
.contentIcon {

View File

@ -19,9 +19,19 @@ interface Props {
function Connecting ({ className }: Props): React.ReactElement<Props> | null {
const { t } = useTranslation();
const { isApiConnected, isWaitingInjected } = useApi();
const { isApiConnected, isApiReady, isWaitingInjected } = useApi();
if (isWaitingInjected) {
if (!isApiReady) {
return (
<BaseOverlay
className={className}
icon='puzzle-piece'
type='info'
>
<div>{t<string>('Waiting to make a connection to the remote endpoint and finishing API initialization.')}</div>
</BaseOverlay>
);
} else if (isWaitingInjected) {
return (
<BaseOverlay
className={className}