Skip to content

Commit abfd89b

Browse files
committed
test
1 parent 3ce1fa7 commit abfd89b

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

frontend/src/components/TelegramMainButton/TelegramMainButton.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,18 @@ export const TelegramMainButton = memo(
6060
}
6161
}, [disabled, loading, text])
6262

63+
useEffect(() => {
64+
if (webApp.MainButton && onClick) {
65+
webApp.MainButton.onClick(onClick)
66+
67+
return () => {
68+
if (webApp.MainButton) {
69+
webApp.MainButton.offClick(onClick)
70+
}
71+
}
72+
}
73+
}, [onClick])
74+
6375
if (
6476
webApp.platform === 'unknown' &&
6577
process.env.NODE_ENV !== 'production' &&

frontend/src/pages/admin/ConditionPage/components/Toncoin/Toncoin.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const Toncoin = ({ isNewCondition }: ConditionComponentProps) => {
6565
}, [])
6666

6767
useEffect(() => {
68-
if (categories?.length && isNewCondition) {
68+
if (categories?.length && isNewCondition && !conditionState) {
6969
setConditionState({
7070
type: 'toncoin',
7171
asset: categories[0].asset,

0 commit comments

Comments
 (0)