// Copyright (c) Meta Platforms, Inc. and affiliates. // This source code is licensed under the MIT license found in the // LICENSE file in the root directory of this source tree. import React from "react"; import Circle from "./Pose/Circle"; import Line from "./Pose/Line"; export default function App() { // grab global vars inserted by the Flask app const cfg = window.cfg; const imageData = window.image.data; const imageHeight = cfg.height; const imageWidth = cfg.width; const originalPoints = cfg.skeleton; const [points, setPoints] = React.useState(() => JSON.parse(JSON.stringify(originalPoints)) ); const [hoveredJoint, setHoveredJoint] = React.useState(null); const [isMoving, setIsMoving] = React.useState(false); return ( <>