text: const ARTWORKS_UNITS_TO_USER_UNITS = (1.0 / 640.0) * (4.0 / 3.0);
  
  function convertTags(tags) {
      return tags?.map(({tag: Tag, body, children, ...data}, index) => {
          return <Tag {...data} key={index}>
              {body}
              {convertTags(children)}
          </Tag>
      }) || [];
  }
  
  function ArtworksComponent({artworks}) {
      const {
          boundingBox: {minX, maxX, minY, maxY},
          tags
      } = artworks;
  
      const viewBoxWidth = Math.max(maxX - minX, 1);
      const viewBoxHeight = Math.max(maxY - minY, 1);
  
      const viewBox = [minX, -maxY, viewBoxWidth, viewBoxHeight];
  
      const width = viewBoxWidth * ARTWORKS_UNITS_TO_USER_UNITS;
      const height = viewBoxHeight * ARTWORKS_UNITS_TO_USER_UNITS;
  
      return (
          <div>
              <svg width={width} height={height} viewBox={`${viewBox.join(' ')}`}>
                  {convertTags(tags)}
              </svg>
          </div>
      );
  }
  
  export default ArtworksComponent;
  