Untitled

 avatar
unknown
plain_text
2 years ago
402 B
4
Indexable
const submitPayment = async () => {
		const res = await UserAPI.getProductById('xxxxxxx')

		if (res.status === 'success') {
			console.log(res)
		}

		setTimeout(() => {
			window.open('https://detik.com', "_blank");
		});
  };

<Button variant="contained" type="submit" onClick={handleSubmit(submitPayment)} sx={{ width: 251, fontSize: { xs: 12, sm: 14 } }}>
    Sample Button
</Button>
Editor is loading...