import { useState } from "react"; import { startBuyFlow } from "../api/client"; import { Button, FormControlLabel, Grid, Paper, Radio, RadioGroup, Typography, } from "@mui/material"; import { useNavigate } from "react-router"; export const Buy = () => { const [quantity, setQuantity] = useState(0); const navigate = useNavigate(); const handleBuyFlow = () => startBuyFlow(quantity).then( (response) => (window.location.href = response.data.url), ); return ( Buy tokens setQuantity(parseInt(e.target.value))} > } label="1 token - 4€" /> } label="5 tokens - 20€" /> } label="10 tokens - 40" /> ); };