mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
Update TelegramLoginButton.tsx
This commit is contained in:
@@ -15,8 +15,10 @@ export default function TelegramLoginButton({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!containerRef.current || !botUsername) return
|
if (!containerRef.current || !botUsername) return
|
||||||
|
|
||||||
// Clear previous widget
|
// Clear previous widget using safe DOM API
|
||||||
containerRef.current.innerHTML = ''
|
while (containerRef.current.firstChild) {
|
||||||
|
containerRef.current.removeChild(containerRef.current.firstChild)
|
||||||
|
}
|
||||||
|
|
||||||
// Get current URL for redirect
|
// Get current URL for redirect
|
||||||
const redirectUrl = `${window.location.origin}/auth/telegram/callback`
|
const redirectUrl = `${window.location.origin}/auth/telegram/callback`
|
||||||
|
|||||||
Reference in New Issue
Block a user