From 55e7145ba29526cf1513c9a2195332d0a1b268d3 Mon Sep 17 00:00:00 2001 From: MathieuG-P <40181755+Zagrios@users.noreply.github.com> Date: Sat, 10 Dec 2022 17:19:46 +0100 Subject: [PATCH] lazy load map images --- .../map-item.component.tsx | 5 ++-- .../components/shared/bsm-image.component.tsx | 27 ++++++++++++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/renderer/components/maps-mangement-components/map-item.component.tsx b/src/renderer/components/maps-mangement-components/map-item.component.tsx index b1a6b2e6..e9e89a72 100644 --- a/src/renderer/components/maps-mangement-components/map-item.component.tsx +++ b/src/renderer/components/maps-mangement-components/map-item.component.tsx @@ -16,6 +16,7 @@ import { v4 as uuidv4 } from 'uuid'; import equal from "fast-deep-equal/es6"; import { getMapZipUrlFromHash } from "renderer/helpers/maps-utils"; import { BsmBasicSpinner } from "../shared/bsm-basic-spinner/bsm-basic-spinner.component"; +import defaultImage from '../../../../assets/images/default-version-img.jpg' export type ParsedMapDiff = {type: BsvMapDifficultyType, name: string, stars: number} @@ -160,13 +161,13 @@ export const MapItem = memo(({hash, title, autor, songAutor, coverUrl, songUrl,