diff --git a/package.json b/package.json index 11a130c..f3de0ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@altiore/twa", - "version": "1.2.7", + "version": "1.2.8", "description": "React components for Telegram WebApp", "source": "./src/index.ts", "type": "module", diff --git a/src/WebAppProvider.tsx b/src/WebAppProvider.tsx index 10a53fc..4cecc6a 100644 --- a/src/WebAppProvider.tsx +++ b/src/WebAppProvider.tsx @@ -96,16 +96,9 @@ const WebAppProvider = ({ scriptEle.addEventListener('load', successListener); scriptEle.addEventListener('error', errorListener); - - return () => { - scriptEle.removeEventListener('load', successListener); - scriptEle.removeEventListener('error', errorListener); - }; } catch (err) { console.error(err); } - - return () => {}; }, [setIsLoaded, setIsLoading, setWebApp], ); @@ -136,8 +129,6 @@ const WebAppProvider = ({ setIsLoaded(false); setIsLoading(false); } - - return () => {}; }, [subscribeScriptLoading, isLoading, isLoaded]); const systemValue = useMemo(createSystemContextValue, []);