mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-23 00:07:07 +00:00
Fixed: Ensure loading message doesn't change on re-render
This commit is contained in:
parent
e325a5c27e
commit
f748891b4b
1 changed files with 6 additions and 2 deletions
|
@ -22,9 +22,13 @@ const messages = [
|
||||||
'Loading Battlestation'
|
'Loading Battlestation'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
let message = null;
|
||||||
|
|
||||||
function LoadingMessage() {
|
function LoadingMessage() {
|
||||||
const index = Math.floor(Math.random() * messages.length);
|
if (!message) {
|
||||||
const message = messages[index];
|
const index = Math.floor(Math.random() * messages.length);
|
||||||
|
message = messages[index];
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.loadingMessage}>
|
<div className={styles.loadingMessage}>
|
||||||
|
|
Loading…
Reference in a new issue