import React from 'react'; import {useStream} from "ui/effects"; import {SELECTABLE_ENTITIES} from "../../scene/entityContextPlugin"; export function SelectionView() { const selections = []; SELECTABLE_ENTITIES.forEach(entity => { selections.push(useStream(ctx => ctx.streams.selection[entity])); }); return
{SELECTABLE_ENTITIES.map((entity, i) => { const selection = selections[i]; if (selection.length === 0) { return null; } return
{entity}
})}
}