added video for FAM and video support to gallery

This commit is contained in:
Hunter W.
2026-05-31 23:34:21 -04:00
parent dc5cd50b57
commit d979ac7f9b
6 changed files with 436 additions and 155 deletions

View File

@@ -23,6 +23,7 @@ export default function Projects() {
const [topCellHeight, setTopCellHeight] = useState(defaultExpandedHeightUnits);
const [layouts, setLayouts] = useState<Record<DefaultBreakpoints, Layout>>(updateLayout(1));
function setExpandedHeight(height: number) {
const gridUnits = height === 0 ? defaultExpandedHeightUnits : Math.ceil(height / rowHeight);
setTopCellHeight(gridUnits);
@@ -35,9 +36,11 @@ export default function Projects() {
setLayouts(updateLayout(id, topCellHeight)); // pass both
}
function updateLayout(activeId: number, cellHeight?: number) : Record<DefaultBreakpoints, Layout> {
const currentSelected = activeId ?? selectedProject;
const currentCellHeight = cellHeight ?? topCellHeight;
let isSelected = (projectId: number) => projectId === currentSelected;
return {
"sm": PROJECTS.map((project, i) => {