MainButton click passes event with evenData undefined #62
Unanswered
reloverevolt
asked this question in
Q&A
Replies: 1 comment
-
Hi! It is definitely a Telegram issue |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have just noticed that MainButton has broken or something, yesterday it was functioning as expected , but now on each click console just reports:
my component is:
<MainButton text="Buy" onClick={handleMainButtonClick}/>
handler:
`function handleMainButtonClick(): void {
WebApp.onEvent("mainButtonClicked", function(){
const orderBody = {
user: profile?.userId,
items: [{product: selectedProduct["id"], quantity: 1}],
currency: "rub",
promocode: null,
discount_id: discounts ? discounts[0]["id"] : null
};
const requestOptions = {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(orderBody)
};
I have checked and didn't find any recent updates on the side of telegram or repo
Anyone has an idea of what could be the issue?
Beta Was this translation helpful? Give feedback.
All reactions