Skip to content

Commit 9bf2d76

Browse files
committed
re-fix this
1 parent 97e7b20 commit 9bf2d76

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

src/routes/history/show/[...showDate]/merch-messages/components/MerchMessage.svelte

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,22 @@
2020
const seconds = Math.floor(message.timestamp);
2121
const imageUrl = `https://merch-message-images.whenplane.com/${message.show}/images/${seconds}.jpg`;
2222
23-
const floatplaneSeconds = source.startsWith('floatplane')
24-
? source === 'floatplane-live'
25-
? seconds + 50
26-
: seconds
27-
: preShowLength !== null
28-
? seconds + Math.floor(preShowLength / 1e3)
29-
: null;
30-
const youtubeSeconds =
23+
const floatplaneSeconds = $derived(
24+
source.startsWith('floatplane')
25+
? source === 'floatplane-live'
26+
? seconds + 50
27+
: seconds
28+
: preShowLength !== null
29+
? seconds + Math.floor(preShowLength / 1e3)
30+
: null
31+
);
32+
const youtubeSeconds = $derived(
3133
source === 'youtube'
3234
? seconds
3335
: preShowLength !== null
3436
? (floatplaneSeconds ?? seconds) - Math.floor(preShowLength / 1e3)
35-
: null;
37+
: null
38+
);
3639
</script>
3740

3841
<div

0 commit comments

Comments
 (0)