import { Button } from "antd";

function SceneSwitch({ scene, setScene }) {
  const switchHandler = () => {
    setScene(scene === 1 ? 2 : 1);
  };

  return (
    <Button className="scene-switch" type="primary" onClick={switchHandler}>
      切换到场景{scene === 1 ? "二" : "一"}
    </Button>
  );
}

export default SceneSwitch;
