Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
402 B
1
Indexable
Never
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>