fix: handle undefined data in SelectShape(?)

currently, SelectShape exspects empty data to be defined as an empty array aka [] in its data prop. Check this before calling getSelectedShape. But first, resolve the following tasks:

  • refactor SelectShape to a typescript component.

  • discuss refactoring of the data prop to a selectedShape prop.

Edited by Stefan Hynek