factor out config error handling
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
4954c732ee
commit
2837c41ca4
3 changed files with 40 additions and 32 deletions
|
@ -150,15 +150,7 @@ export async function showError(title: string, messages?: string[]) {
|
|||
/* webpackChunkName: "error-view" */
|
||||
/* webpackPreload: true */
|
||||
"../components/structures/ErrorView")).default;
|
||||
const message = <div>
|
||||
{messages && messages.map(msg => <p key={msg}>
|
||||
{languageHandler._t(
|
||||
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.",
|
||||
)}
|
||||
</p>)}
|
||||
</div>;
|
||||
|
||||
window.matrixChat = ReactDOM.render(<ErrorView title={title} message={message} />,
|
||||
window.matrixChat = ReactDOM.render(<ErrorView title={title} messages={messages} />,
|
||||
document.getElementById('matrixchat'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue