Remove one featured interactive
Remove one featured interactive from the homepage to maintain a list of three.
This commit is contained in:
parent
5305eaaee9
commit
45f984027e
1 changed files with 3 additions and 3 deletions
|
|
@ -92,12 +92,12 @@ const allInteractives = [{
|
|||
theme: 'Puzzles'
|
||||
}];
|
||||
|
||||
// Featured interactives (4 fixed ones - removed guessing-game)
|
||||
const featuredInteractives = allInteractives.filter(interactive => ['northcotts-game', 'ternary-search-trick', 'sikinia-parliament', 'binary-search-trick'].includes(interactive.id));
|
||||
// Featured interactives (3 fixed ones)
|
||||
const featuredInteractives = allInteractives.filter(interactive => ['northcotts-game', 'ternary-search-trick', 'sikinia-parliament'].includes(interactive.id));
|
||||
|
||||
// Function to get random interactives (excluding featured ones)
|
||||
const getRandomInteractives = (count: number) => {
|
||||
const availableInteractives = allInteractives.filter(interactive => !['northcotts-game', 'ternary-search-trick', 'sikinia-parliament', 'binary-search-trick'].includes(interactive.id));
|
||||
const availableInteractives = allInteractives.filter(interactive => !['northcotts-game', 'ternary-search-trick', 'sikinia-parliament'].includes(interactive.id));
|
||||
const shuffled = [...availableInteractives].sort(() => 0.5 - Math.random());
|
||||
return shuffled.slice(0, count);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue