Fixing CI

This commit is contained in:
David Négrier 2021-12-14 16:16:42 +01:00
parent ea7fc62c00
commit 7ec8cd2a5b
2 changed files with 12 additions and 7 deletions

View file

@ -1,6 +1,7 @@
<script lang="typescript">
import { gameManager } from "../../Phaser/Game/GameManager";
import type { PictureStore } from "../../Stores/PictureStore";
import { onDestroy } from "svelte";
export let userId: number;
export let placeholderSrc: string;
@ -17,14 +18,19 @@
(item) => item.companion?.pictureStore
);
}
let src = placeholderSrc;
if (companionWokaPictureStore) {
const unsubscribe = companionWokaPictureStore.subscribe((source) => {
src = source ?? placeholderSrc;
});
onDestroy(unsubscribe);
}
</script>
<img
src={$companionWokaPictureStore ?? placeholderSrc}
alt=""
class="nes-pointer"
style="--theme-width: {width}; --theme-height: {height}"
/>
<img {src} alt="" class="nes-pointer" style="--theme-width: {width}; --theme-height: {height}" />
<style>
img {

View file

@ -2,7 +2,6 @@
import { onDestroy } from "svelte";
import { gameManager } from "../../Phaser/Game/GameManager";
import { playersStore } from "../../Stores/PlayersStore";
export let userId: number;
export let placeholderSrc: string;