Promote speakers to the first page of the grid

This commit is contained in:
Robin Townsend
2023-06-18 11:32:21 -04:00
parent 4e5a75074a
commit ddeb36db47
5 changed files with 36 additions and 1 deletions

View File

@@ -46,6 +46,7 @@ import {
addItems,
tryMoveTile,
resize,
promoteSpeakers,
} from "./model";
import { TileWrapper } from "./TileWrapper";
@@ -96,6 +97,9 @@ const useGridState = (
const newItems = items.filter((i) => !existingItemIds.has(i.id));
const grid3 = addItems(newItems, grid2);
// Step 4: Promote speakers to the top
promoteSpeakers(grid3);
return { ...grid3, generation: prevGrid.generation + 1 };
},
[columns, items]