From 88fbd784927b1405cead8cb7be96544778d5ab64 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Mon, 1 Jan 2024 18:04:38 +0100 Subject: [PATCH] fix: shuffle by default --- website/src/components/Showcase.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/website/src/components/Showcase.jsx b/website/src/components/Showcase.jsx index 32940f94..2cd0317e 100644 --- a/website/src/components/Showcase.jsx +++ b/website/src/components/Showcase.jsx @@ -10,9 +10,10 @@ export function shuffleArray(array) { } return array; } +let _shuffled; export function Showcase() { - const [videos, setVideos] = useState(_videos); + const [videos, setVideos] = useState(_shuffled); return ( <>
@@ -34,7 +35,7 @@ export function Showcase() { ); } -const _videos = [ +let _videos = [ // solstice 2023 { title: 'Jade Rose @ solstice stream 2023', id: 'wg0vW5Ac7L0' }, { @@ -119,3 +120,5 @@ const _videos = [ }, { title: 'froos @ Algorave 10th Birthday stream', id: 'IcMSocdKwvw' }, ]; + +_shuffled = shuffleArray(_videos);