Fixed: Ensure loading message doesn't change on re-render

This commit is contained in:
Mark McDowall 2019-04-06 19:22:24 -07:00
parent e325a5c27e
commit f748891b4b
1 changed files with 6 additions and 2 deletions

View File

@ -22,9 +22,13 @@ const messages = [
'Loading Battlestation'
];
let message = null;
function LoadingMessage() {
if (!message) {
const index = Math.floor(Math.random() * messages.length);
const message = messages[index];
message = messages[index];
}
return (
<div className={styles.loadingMessage}>