import axios from "axios"; import CropSquareIcon from "@mui/icons-material/CropSquare"; import IconButton from "@mui/material/IconButton"; import Tooltip from "@mui/material/Tooltip"; import { ShareProps } from "@/components/GameCreator"; export function Codesandbox({ title, content }: ShareProps) { return ( { const { data } = await axios.post("/api/url/codesandbox", { content, title, }); window.open(data, "_blank"); }} > ); }