Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Aug 22, 2024
1 parent 4546a36 commit 11303c4
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from 'react'
import { useEffect, useState } from 'react'
import reactLogo from './assets/react.svg'
import twaLogo from './assets/tapps.png'
import viteLogo from '/vite.svg'
Expand All @@ -19,6 +19,10 @@ function App() {

const cartridgeConnector = connectors[0]

useEffect(() => {
window.Telegram.WebApp.SettingsButton.isVisible = true
})

return (
<>
<div>
Expand Down Expand Up @@ -49,27 +53,27 @@ function App() {
</div>

<button onClick={() => {
WebApp.BiometricManager.init(() => {
WebApp.showConfirm('give data', () => WebApp.BiometricManager.requestAccess({
window.Telegram.WebApp.BiometricManager.init(() => {
window.Telegram.WebApp.showConfirm('give data', () => window.Telegram.WebApp.BiometricManager.requestAccess({
reason: 'we need your biometric data',
}, () => {
WebApp.showPopup({
message: 'thank'
})
}))
})
WebApp.showConfirm('give data', () => WebApp.BiometricManager.requestAccess({
window.Telegram.WebApp.showConfirm('give data', () => window.Telegram.WebApp.BiometricManager.requestAccess({
reason: 'we need your biometric data',
}, () => {
WebApp.showPopup({
window.Telegram.WebApp.showPopup({
message: 'thank'
})
}))
}}>
ok
</button>
<div className="card">
<button onClick={() => WebApp.BiometricManager.openSettings()}>
<button onClick={() => window.Telegram.WebApp.BiometricManager.openSettings()}>
Bio settings
</button>
</div>
Expand Down

0 comments on commit 11303c4

Please sign in to comment.