fix: background refresh spam effects issue

This commit is contained in:
David Ralph
2022-09-07 11:22:00 +01:00
parent 532f7cff8c
commit b364923738
2 changed files with 6 additions and 7 deletions

View File

@@ -9,7 +9,7 @@ export function videoCheck(url) {
);
}
export function offlineBackground() {
export function offlineBackground(type) {
// Get all photographers from the keys in offlineImages.json
const photographers = Object.keys(offlineImages);
const photographer = photographers[Math.floor(Math.random() * photographers.length)];
@@ -21,6 +21,7 @@ export function offlineBackground() {
const object = {
url: `./offline-images/${randomImage}.webp`,
type,
photoInfo: {
offline: true,
credit: photographer,