fix: shuffle by default

This commit is contained in:
Felix Roos 2024-01-01 18:04:38 +01:00
parent 9a235a7c15
commit 88fbd78492

View file

@ -10,9 +10,10 @@ export function shuffleArray(array) {
} }
return array; return array;
} }
let _shuffled;
export function Showcase() { export function Showcase() {
const [videos, setVideos] = useState(_videos); const [videos, setVideos] = useState(_shuffled);
return ( return (
<> <>
<div className="flex space-x-2"> <div className="flex space-x-2">
@ -34,7 +35,7 @@ export function Showcase() {
); );
} }
const _videos = [ let _videos = [
// solstice 2023 // solstice 2023
{ title: 'Jade Rose @ solstice stream 2023', id: 'wg0vW5Ac7L0' }, { title: 'Jade Rose @ solstice stream 2023', id: 'wg0vW5Ac7L0' },
{ {
@ -119,3 +120,5 @@ const _videos = [
}, },
{ title: 'froos @ Algorave 10th Birthday stream', id: 'IcMSocdKwvw' }, { title: 'froos @ Algorave 10th Birthday stream', id: 'IcMSocdKwvw' },
]; ];
_shuffled = shuffleArray(_videos);