Fixes for tests
🏗️ Build and Test JellyTau / Run Tests (push) Failing after 31s
🏗️ Build and Test JellyTau / Build Android APK (push) Has been skipped
Traceability Validation / Check Requirement Traces (push) Failing after 3s

This commit is contained in:
2026-06-20 15:28:15 +02:00
parent d6aa74fc85
commit c959c07ab4
13 changed files with 163 additions and 110 deletions
+8 -3
View File
@@ -26,6 +26,7 @@
let imageUrl = $state<string | null>(null);
let loading = $state(true);
let error = $state(false);
let lastLoadKey = "";
async function loadImage() {
if (!itemId) {
@@ -68,10 +69,14 @@
}
}
// Reload image when props change
// Only reload when the image identity changes (not on parent re-renders)
$effect(() => {
imageUrl = null;
loadImage();
const loadKey = `${itemId}|${imageType}|${tag || ""}`;
if (loadKey !== lastLoadKey) {
lastLoadKey = loadKey;
imageUrl = null;
loadImage();
}
});
</script>