Skip to content

Commit e5a9489

Browse files
committed
🚧 Fix video title not updating when swapping
- Also added some new videos
1 parent fb46b63 commit e5a9489

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎src/components/VideoCarousel.svelte

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
'fthlphRmsjY',
1313
'dd7pqAPd-p0',
1414
'M2R3zgvbZ30',
15-
'0UCrI7NJ5KI',
1615
'0xPyRA-he5c',
16+
'0UCrI7NJ5KI',
17+
'yfaQM3aHgxE',
18+
'sC3FqzpDrpQ',
1719
'CO2kYUMpYPk',
1820
'fs0NUGmsa10',
1921
'4VlwyI0EHo4'
@@ -30,7 +32,9 @@
3032
</script>
3133

3234
<div class="container">
33-
<Youtube id={VIDEOS[$index]} animations={false} />
35+
{#key $index}
36+
<Youtube id={VIDEOS[$index]} animations={false} />
37+
{/key}
3438
<div class="grid">
3539
{#each VIDEOS as id}
3640
<!-- svelte-ignore a11y-click-events-have-key-events -->

0 commit comments

Comments
 (0)