Live query error message (#1007)

* Rewrite and style live query error
This commit is contained in:
RachelElysia 2021-06-08 19:10:22 -04:00 committed by GitHub
parent f57768b131
commit 84182e4f49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 7 deletions

View File

@ -539,11 +539,14 @@ export class QueryPage extends Component {
return false;
}
const message = `Live query disabled due to error: ${liveQueryError}`;
return (
<WarningBanner className={`${baseClass}__warning`} shouldShowWarning>
{message}
<h2 className={`${baseClass}__warning-title`}>
Live query request failed
</h2>
<p>
<span>Error:</span> {liveQueryError}
</p>
</WarningBanner>
);
};

View File

@ -13,10 +13,6 @@
min-height: 400px;
}
&__warning {
margin: 0;
}
&__content {
display: flex;
flex-direction: column;
@ -24,6 +20,25 @@
margin-bottom: $pad-medium;
}
&__warning {
margin: $pad-xlarge;
margin-bottom: 0;
&-title {
font-size: $small;
font-weight: $bold;
margin: 0;
}
span {
font-weight: $bold;
}
p {
margin: 0;
margin-top: $pad-xsmall;
}
}
&__observer-query-view {
width: 90%;
max-width: 1060px;