import withHelperText from "../../../hoc/withHelperText";
import withLabel from "../../../hoc/withLabel";
import ShapeWidget, { ShapeProps } from "./ShapeWidget";
import { useState, useEffect } from "react";

const ShapeContainer = (props: ShapeProps) => {
  const [shapeProps, setShapeProps] = useState<ShapeProps>({} as ShapeProps);
  useEffect(() => {
    setShapeProps({ ...props });
  }, [props]);
  return <ShapeWidget {...shapeProps} />;
};
export default withHelperText(withLabel(ShapeContainer));
