diff --git a/babel.config.js b/babel.config.js index 08c04b7af..84d26cbfa 100644 --- a/babel.config.js +++ b/babel.config.js @@ -7,7 +7,13 @@ export default function (api) { const presets = [ '@babel/typescript', '@babel/preset-env', - '@babel/preset-react', + [ + '@babel/preset-react', + { + runtime: 'automatic', + importSource: '@teact', + }, + ], ]; const plugins = [ diff --git a/eslint.config.mjs b/eslint.config.mjs index fe7ce0af2..a36c775f5 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -18,6 +18,7 @@ export default tseslint.config( tseslint.configs.recommendedTypeChecked, tseslint.configs.stylistic, reactPlugin.configs.flat.recommended, + reactPlugin.configs.flat['jsx-runtime'], reactXPlugin.configs['recommended-type-checked'], jsxA11yPlugin.flatConfigs.recommended, ttMultitabPlugin.configs.recommended, diff --git a/src/components/App.tsx b/src/components/App.tsx index 9a48d2460..5a57f6e2c 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -1,5 +1,5 @@ import type { FC } from '../lib/teact/teact'; -import React, { useEffect, useLayoutEffect } from '../lib/teact/teact'; +import { useEffect, useLayoutEffect } from '../lib/teact/teact'; import { withGlobal } from '../global'; import type { GlobalState } from '../global/types'; diff --git a/src/components/auth/Auth.tsx b/src/components/auth/Auth.tsx index 0c448388a..88576f6ca 100644 --- a/src/components/auth/Auth.tsx +++ b/src/components/auth/Auth.tsx @@ -1,7 +1,7 @@ import '../../global/actions/initial'; import type { FC } from '../../lib/teact/teact'; -import React, { memo, useRef } from '../../lib/teact/teact'; +import { memo, useRef } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { GlobalState } from '../../global/types'; diff --git a/src/components/auth/AuthCode.async.tsx b/src/components/auth/AuthCode.async.tsx index c8302efbb..0cb4dfdc7 100644 --- a/src/components/auth/AuthCode.async.tsx +++ b/src/components/auth/AuthCode.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; diff --git a/src/components/auth/AuthCode.tsx b/src/components/auth/AuthCode.tsx index 49d3c7c5b..67039547d 100644 --- a/src/components/auth/AuthCode.tsx +++ b/src/components/auth/AuthCode.tsx @@ -1,6 +1,6 @@ import type { FormEvent } from 'react'; import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useRef, useState, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/auth/AuthPassword.async.tsx b/src/components/auth/AuthPassword.async.tsx index 9f207c0f1..d41ed3cb0 100644 --- a/src/components/auth/AuthPassword.async.tsx +++ b/src/components/auth/AuthPassword.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; diff --git a/src/components/auth/AuthPassword.tsx b/src/components/auth/AuthPassword.tsx index ebe0f4751..ea13aef4d 100644 --- a/src/components/auth/AuthPassword.tsx +++ b/src/components/auth/AuthPassword.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback, useState } from '../../lib/teact/teact'; +import { memo, useCallback, useState } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { GlobalState } from '../../global/types'; diff --git a/src/components/auth/AuthPhoneNumber.tsx b/src/components/auth/AuthPhoneNumber.tsx index 0174364d1..5b9a045ba 100644 --- a/src/components/auth/AuthPhoneNumber.tsx +++ b/src/components/auth/AuthPhoneNumber.tsx @@ -1,6 +1,7 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useLayoutEffect, useMemo, useRef, useState, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/auth/AuthQrCode.tsx b/src/components/auth/AuthQrCode.tsx index 1d2e45036..c7156df32 100644 --- a/src/components/auth/AuthQrCode.tsx +++ b/src/components/auth/AuthQrCode.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useLayoutEffect, useRef, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/auth/AuthRegister.async.tsx b/src/components/auth/AuthRegister.async.tsx index 63579fd2b..85c4daf4c 100644 --- a/src/components/auth/AuthRegister.async.tsx +++ b/src/components/auth/AuthRegister.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; diff --git a/src/components/auth/AuthRegister.tsx b/src/components/auth/AuthRegister.tsx index b7eb6090e..00c04c49c 100644 --- a/src/components/auth/AuthRegister.tsx +++ b/src/components/auth/AuthRegister.tsx @@ -1,6 +1,7 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback, useState } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo, useCallback, useState } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { GlobalState } from '../../global/types'; diff --git a/src/components/auth/CountryCodeInput.tsx b/src/components/auth/CountryCodeInput.tsx index 5a7f64f0a..dda1bc6d6 100644 --- a/src/components/auth/CountryCodeInput.tsx +++ b/src/components/auth/CountryCodeInput.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useCallback, useRef, useState, } from '../../lib/teact/teact'; import { withGlobal } from '../../global'; diff --git a/src/components/calls/ActiveCallHeader.async.tsx b/src/components/calls/ActiveCallHeader.async.tsx index a55d51745..055a811ee 100644 --- a/src/components/calls/ActiveCallHeader.async.tsx +++ b/src/components/calls/ActiveCallHeader.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; diff --git a/src/components/calls/ActiveCallHeader.tsx b/src/components/calls/ActiveCallHeader.tsx index 3fc35177e..21c2e4b8d 100644 --- a/src/components/calls/ActiveCallHeader.tsx +++ b/src/components/calls/ActiveCallHeader.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useEffect } from '../../lib/teact/teact'; +import { memo, useEffect } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { ApiGroupCall, ApiUser } from '../../api/types'; diff --git a/src/components/calls/group/GroupCall.async.tsx b/src/components/calls/group/GroupCall.async.tsx index 0068d9ab4..2f642f30b 100644 --- a/src/components/calls/group/GroupCall.async.tsx +++ b/src/components/calls/group/GroupCall.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './GroupCall'; diff --git a/src/components/calls/group/GroupCall.tsx b/src/components/calls/group/GroupCall.tsx index 30384d757..342d37dac 100644 --- a/src/components/calls/group/GroupCall.tsx +++ b/src/components/calls/group/GroupCall.tsx @@ -1,7 +1,7 @@ import '../../../global/actions/calls'; import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/calls/group/GroupCallParticipant.tsx b/src/components/calls/group/GroupCallParticipant.tsx index c0127b860..68f0c1a49 100644 --- a/src/components/calls/group/GroupCallParticipant.tsx +++ b/src/components/calls/group/GroupCallParticipant.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, useRef, } from '../../../lib/teact/teact'; import { withGlobal } from '../../../global'; diff --git a/src/components/calls/group/GroupCallParticipantList.tsx b/src/components/calls/group/GroupCallParticipantList.tsx index c8e9b3817..de7030e2d 100644 --- a/src/components/calls/group/GroupCallParticipantList.tsx +++ b/src/components/calls/group/GroupCallParticipantList.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { GroupCallParticipant as TypeGroupCallParticipant } from '../../../lib/secret-sauce'; diff --git a/src/components/calls/group/GroupCallParticipantMenu.tsx b/src/components/calls/group/GroupCallParticipantMenu.tsx index 05ba2788e..f6871dfdb 100644 --- a/src/components/calls/group/GroupCallParticipantMenu.tsx +++ b/src/components/calls/group/GroupCallParticipantMenu.tsx @@ -1,5 +1,6 @@ import type { ElementRef, FC } from '../../../lib/teact/teact'; -import React, { memo, useEffect, useState } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useState } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { GroupCallParticipant } from '../../../lib/secret-sauce'; diff --git a/src/components/calls/group/GroupCallParticipantVideo.tsx b/src/components/calls/group/GroupCallParticipantVideo.tsx index b81dffd37..732810d12 100644 --- a/src/components/calls/group/GroupCallParticipantVideo.tsx +++ b/src/components/calls/group/GroupCallParticipantVideo.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { withGlobal } from '../../../global'; diff --git a/src/components/calls/group/GroupCallTopPane.tsx b/src/components/calls/group/GroupCallTopPane.tsx index 9647b87bf..2fc4f7825 100644 --- a/src/components/calls/group/GroupCallTopPane.tsx +++ b/src/components/calls/group/GroupCallTopPane.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; diff --git a/src/components/calls/group/MicrophoneButton.tsx b/src/components/calls/group/MicrophoneButton.tsx index 5ad28e02c..d0b827231 100644 --- a/src/components/calls/group/MicrophoneButton.tsx +++ b/src/components/calls/group/MicrophoneButton.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/calls/group/OutlinedMicrophoneIcon.tsx b/src/components/calls/group/OutlinedMicrophoneIcon.tsx index a40fbc5a2..bd33691bc 100644 --- a/src/components/calls/group/OutlinedMicrophoneIcon.tsx +++ b/src/components/calls/group/OutlinedMicrophoneIcon.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import type { GroupCallParticipant } from '../../../lib/secret-sauce'; diff --git a/src/components/calls/phone/PhoneCall.async.tsx b/src/components/calls/phone/PhoneCall.async.tsx index 189902f85..8ffb61d4b 100644 --- a/src/components/calls/phone/PhoneCall.async.tsx +++ b/src/components/calls/phone/PhoneCall.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import { Bundles } from '../../../util/moduleLoader'; diff --git a/src/components/calls/phone/PhoneCall.tsx b/src/components/calls/phone/PhoneCall.tsx index 9fb87e693..9f1232681 100644 --- a/src/components/calls/phone/PhoneCall.tsx +++ b/src/components/calls/phone/PhoneCall.tsx @@ -1,7 +1,7 @@ import '../../../global/actions/calls'; import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useRef, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/calls/phone/PhoneCallButton.tsx b/src/components/calls/phone/PhoneCallButton.tsx index 02d28e4a1..85de8aa11 100644 --- a/src/components/calls/phone/PhoneCallButton.tsx +++ b/src/components/calls/phone/PhoneCallButton.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import type { IconName } from '../../../types/icons'; diff --git a/src/components/calls/phone/RatePhoneCallModal.async.tsx b/src/components/calls/phone/RatePhoneCallModal.async.tsx index 800b38599..a6cabdd6b 100644 --- a/src/components/calls/phone/RatePhoneCallModal.async.tsx +++ b/src/components/calls/phone/RatePhoneCallModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './RatePhoneCallModal'; diff --git a/src/components/calls/phone/RatePhoneCallModal.tsx b/src/components/calls/phone/RatePhoneCallModal.tsx index 1d8d030c0..fe062fc06 100644 --- a/src/components/calls/phone/RatePhoneCallModal.tsx +++ b/src/components/calls/phone/RatePhoneCallModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useRef, useState, } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; diff --git a/src/components/common/AboutMonetizationModal.async.tsx b/src/components/common/AboutMonetizationModal.async.tsx index 4f481da77..bd58a346f 100644 --- a/src/components/common/AboutMonetizationModal.async.tsx +++ b/src/components/common/AboutMonetizationModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './AboutMonetizationModal'; diff --git a/src/components/common/AboutMonetizationModal.tsx b/src/components/common/AboutMonetizationModal.tsx index b4088779a..328e7b512 100644 --- a/src/components/common/AboutMonetizationModal.tsx +++ b/src/components/common/AboutMonetizationModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useMemo } from '../../lib/teact/teact'; +import { memo, useMemo } from '../../lib/teact/teact'; import type { TableAboutData } from '../modals/common/TableAboutModal'; diff --git a/src/components/common/AnimatedCounter.tsx b/src/components/common/AnimatedCounter.tsx index 540e3fd25..4ac1fb3bd 100644 --- a/src/components/common/AnimatedCounter.tsx +++ b/src/components/common/AnimatedCounter.tsx @@ -1,5 +1,6 @@ import type { ElementRef, FC } from '../../lib/teact/teact'; -import React, { memo, useEffect, useMemo } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useMemo } from '../../lib/teact/teact'; import { getGlobal } from '../../global'; import { selectCanAnimateInterface } from '../../global/selectors'; diff --git a/src/components/common/AnimatedIcon.tsx b/src/components/common/AnimatedIcon.tsx index a1339ee02..c06c97e26 100644 --- a/src/components/common/AnimatedIcon.tsx +++ b/src/components/common/AnimatedIcon.tsx @@ -1,4 +1,4 @@ -import React, { memo, useState } from '../../lib/teact/teact'; +import { memo, useState } from '../../lib/teact/teact'; import type { OwnProps as AnimatedStickerProps } from './AnimatedSticker'; diff --git a/src/components/common/AnimatedIconFromSticker.tsx b/src/components/common/AnimatedIconFromSticker.tsx index 8a51ac417..2f2f3061b 100644 --- a/src/components/common/AnimatedIconFromSticker.tsx +++ b/src/components/common/AnimatedIconFromSticker.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import type { ApiSticker } from '../../api/types'; import type { OwnProps as AnimatedIconProps } from './AnimatedIcon'; diff --git a/src/components/common/AnimatedIconWithPreview.tsx b/src/components/common/AnimatedIconWithPreview.tsx index 32ab30cec..fa7814e1b 100644 --- a/src/components/common/AnimatedIconWithPreview.tsx +++ b/src/components/common/AnimatedIconWithPreview.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import type { OwnProps as AnimatedIconProps } from './AnimatedIcon'; diff --git a/src/components/common/AnimatedSticker.tsx b/src/components/common/AnimatedSticker.tsx index 0b45e5e4e..150b4fb04 100644 --- a/src/components/common/AnimatedSticker.tsx +++ b/src/components/common/AnimatedSticker.tsx @@ -1,5 +1,5 @@ import type { ElementRef, FC } from '../../lib/teact/teact'; -import React, { +import { getIsHeavyAnimating, memo, useEffect, diff --git a/src/components/common/Audio.tsx b/src/components/common/Audio.tsx index d45b835de..f94670dd4 100644 --- a/src/components/common/Audio.tsx +++ b/src/components/common/Audio.tsx @@ -1,5 +1,5 @@ import type { ElementRef, FC } from '../../lib/teact/teact'; -import React, { +import { memo, useEffect, useLayoutEffect, useMemo, useRef, useState, } from '../../lib/teact/teact'; import { getActions } from '../../global'; diff --git a/src/components/common/Avatar.tsx b/src/components/common/Avatar.tsx index 46c180da1..4f85ba21c 100644 --- a/src/components/common/Avatar.tsx +++ b/src/components/common/Avatar.tsx @@ -1,6 +1,7 @@ import type { MouseEvent as ReactMouseEvent } from 'react'; import type { FC, TeactNode } from '../../lib/teact/teact'; -import React, { memo, useMemo, useRef } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo, useMemo, useRef } from '../../lib/teact/teact'; import { getActions } from '../../global'; import type { diff --git a/src/components/common/AvatarList.tsx b/src/components/common/AvatarList.tsx index 87e4dba8c..b7586be08 100644 --- a/src/components/common/AvatarList.tsx +++ b/src/components/common/AvatarList.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useMemo } from '../../lib/teact/teact'; +import { memo, useMemo } from '../../lib/teact/teact'; import type { ApiPeer } from '../../api/types'; import type { AvatarSize } from './Avatar'; diff --git a/src/components/common/AvatarStoryCircle.tsx b/src/components/common/AvatarStoryCircle.tsx index 7b41ef72c..0af8a74ea 100644 --- a/src/components/common/AvatarStoryCircle.tsx +++ b/src/components/common/AvatarStoryCircle.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useLayoutEffect, useMemo, useRef, } from '../../lib/teact/teact'; import { withGlobal } from '../../global'; diff --git a/src/components/common/BadgeButton.tsx b/src/components/common/BadgeButton.tsx index 0478b8a11..8974a5a72 100644 --- a/src/components/common/BadgeButton.tsx +++ b/src/components/common/BadgeButton.tsx @@ -1,4 +1,4 @@ -import React from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/common/Blockquote.tsx b/src/components/common/Blockquote.tsx index 9ad2af9d7..977426151 100644 --- a/src/components/common/Blockquote.tsx +++ b/src/components/common/Blockquote.tsx @@ -1,4 +1,4 @@ -import React, { +import { type TeactNode, useRef, } from '../../lib/teact/teact'; diff --git a/src/components/common/CalendarModal.async.tsx b/src/components/common/CalendarModal.async.tsx index 61622af7b..0343cb58a 100644 --- a/src/components/common/CalendarModal.async.tsx +++ b/src/components/common/CalendarModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './CalendarModal'; diff --git a/src/components/common/CalendarModal.tsx b/src/components/common/CalendarModal.tsx index 2d58ee001..8523e5b88 100644 --- a/src/components/common/CalendarModal.tsx +++ b/src/components/common/CalendarModal.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useCallback, useEffect, useMemo, useState, } from '../../lib/teact/teact'; diff --git a/src/components/common/ChatForumLastMessage.tsx b/src/components/common/ChatForumLastMessage.tsx index a5736b11a..16f0857e4 100644 --- a/src/components/common/ChatForumLastMessage.tsx +++ b/src/components/common/ChatForumLastMessage.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useMemo, diff --git a/src/components/common/ChatLink.tsx b/src/components/common/ChatLink.tsx index 03da3a69f..a4d84f713 100644 --- a/src/components/common/ChatLink.tsx +++ b/src/components/common/ChatLink.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo, useCallback } from '../../lib/teact/teact'; import { getActions } from '../../global'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/common/Composer.tsx b/src/components/common/Composer.tsx index c75dd7f20..08f2947ff 100644 --- a/src/components/common/Composer.tsx +++ b/src/components/common/Composer.tsx @@ -1,5 +1,5 @@ import type { FC, TeactNode } from '../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, useSignal, useState, } from '../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../global'; diff --git a/src/components/common/CountryPickerModal.async.tsx b/src/components/common/CountryPickerModal.async.tsx index dc0b03a97..ffe61b84e 100644 --- a/src/components/common/CountryPickerModal.async.tsx +++ b/src/components/common/CountryPickerModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './CountryPickerModal'; diff --git a/src/components/common/CountryPickerModal.tsx b/src/components/common/CountryPickerModal.tsx index a3657a235..614a355bc 100644 --- a/src/components/common/CountryPickerModal.tsx +++ b/src/components/common/CountryPickerModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useMemo, useState, } from '../../lib/teact/teact'; import { getActions } from '../../global'; diff --git a/src/components/common/CustomEmoji.tsx b/src/components/common/CustomEmoji.tsx index 3b5f34a15..49ab91f93 100644 --- a/src/components/common/CustomEmoji.tsx +++ b/src/components/common/CustomEmoji.tsx @@ -1,5 +1,5 @@ import type { ElementRef, FC } from '../../lib/teact/teact'; -import React, { memo, useRef, useState } from '../../lib/teact/teact'; +import { memo, useRef, useState } from '../../lib/teact/teact'; import { getGlobal } from '../../global'; import type { ObserveFn } from '../../hooks/useIntersectionObserver'; diff --git a/src/components/common/CustomEmojiPicker.tsx b/src/components/common/CustomEmojiPicker.tsx index 329d79a05..bfeabc7df 100644 --- a/src/components/common/CustomEmojiPicker.tsx +++ b/src/components/common/CustomEmojiPicker.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, } from '../../lib/teact/teact'; import { getGlobal, withGlobal } from '../../global'; diff --git a/src/components/common/CustomEmojiSetsModal.async.tsx b/src/components/common/CustomEmojiSetsModal.async.tsx index 391264b84..370d29795 100644 --- a/src/components/common/CustomEmojiSetsModal.async.tsx +++ b/src/components/common/CustomEmojiSetsModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './CustomEmojiSetsModal'; diff --git a/src/components/common/CustomEmojiSetsModal.tsx b/src/components/common/CustomEmojiSetsModal.tsx index e7fdcf713..ef0f8c24c 100644 --- a/src/components/common/CustomEmojiSetsModal.tsx +++ b/src/components/common/CustomEmojiSetsModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useMemo, useRef, diff --git a/src/components/common/DeleteChatModal.tsx b/src/components/common/DeleteChatModal.tsx index bd1ef7609..c01052d00 100644 --- a/src/components/common/DeleteChatModal.tsx +++ b/src/components/common/DeleteChatModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { ApiChat } from '../../api/types'; diff --git a/src/components/common/DeleteMessageModal.async.tsx b/src/components/common/DeleteMessageModal.async.tsx index ba3638be1..6fc37560d 100644 --- a/src/components/common/DeleteMessageModal.async.tsx +++ b/src/components/common/DeleteMessageModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './DeleteMessageModal'; diff --git a/src/components/common/DeleteMessageModal.tsx b/src/components/common/DeleteMessageModal.tsx index a4cbc8528..08b3cf4de 100644 --- a/src/components/common/DeleteMessageModal.tsx +++ b/src/components/common/DeleteMessageModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, diff --git a/src/components/common/DeleteProfilePhotoModal.tsx b/src/components/common/DeleteProfilePhotoModal.tsx index a98475ec5..295df3c9f 100644 --- a/src/components/common/DeleteProfilePhotoModal.tsx +++ b/src/components/common/DeleteProfilePhotoModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback } from '../../lib/teact/teact'; +import { memo, useCallback } from '../../lib/teact/teact'; import { getActions } from '../../global'; import type { ApiPhoto } from '../../api/types'; diff --git a/src/components/common/Document.tsx b/src/components/common/Document.tsx index 0b568fbe3..892e9dbba 100644 --- a/src/components/common/Document.tsx +++ b/src/components/common/Document.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useEffect, useRef, useState, } from '../../lib/teact/teact'; import { getActions } from '../../global'; diff --git a/src/components/common/DotAnimation.tsx b/src/components/common/DotAnimation.tsx index b676e0be2..cf3555fd5 100644 --- a/src/components/common/DotAnimation.tsx +++ b/src/components/common/DotAnimation.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; import renderText from './helpers/renderText'; diff --git a/src/components/common/FakeIcon.tsx b/src/components/common/FakeIcon.tsx index 8a7f32dff..7a9716c0d 100644 --- a/src/components/common/FakeIcon.tsx +++ b/src/components/common/FakeIcon.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import type { ApiFakeType } from '../../api/types'; diff --git a/src/components/common/File.tsx b/src/components/common/File.tsx index ae79ec0f5..ab8c6a398 100644 --- a/src/components/common/File.tsx +++ b/src/components/common/File.tsx @@ -1,5 +1,6 @@ import type { ElementRef, FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useMemo, useRef, useState, } from '../../lib/teact/teact'; diff --git a/src/components/common/FullNameTitle.tsx b/src/components/common/FullNameTitle.tsx index 688605140..dfa2a9fbb 100644 --- a/src/components/common/FullNameTitle.tsx +++ b/src/components/common/FullNameTitle.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useMemo } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo, useMemo } from '../../lib/teact/teact'; import { getActions } from '../../global'; import type { diff --git a/src/components/common/GifButton.tsx b/src/components/common/GifButton.tsx index 0d931bd98..c4f958cb1 100644 --- a/src/components/common/GifButton.tsx +++ b/src/components/common/GifButton.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useRef, useState, } from '../../lib/teact/teact'; diff --git a/src/components/common/GroupCallLink.tsx b/src/components/common/GroupCallLink.tsx index f76a62860..37b20fa3e 100644 --- a/src/components/common/GroupCallLink.tsx +++ b/src/components/common/GroupCallLink.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { useCallback } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { useCallback } from '../../lib/teact/teact'; import { getActions } from '../../global'; import type { ApiGroupCall } from '../../api/types'; diff --git a/src/components/common/GroupChatInfo.tsx b/src/components/common/GroupChatInfo.tsx index 1055c5bfc..841d24c74 100644 --- a/src/components/common/GroupChatInfo.tsx +++ b/src/components/common/GroupChatInfo.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useEffect, useMemo } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useMemo } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { diff --git a/src/components/common/LastMessageMeta.tsx b/src/components/common/LastMessageMeta.tsx index 82798d43d..be98ca70c 100644 --- a/src/components/common/LastMessageMeta.tsx +++ b/src/components/common/LastMessageMeta.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import type { ApiMessage, ApiMessageOutgoingStatus } from '../../api/types'; diff --git a/src/components/common/LinkField.tsx b/src/components/common/LinkField.tsx index aeffa4f14..fd164ee20 100644 --- a/src/components/common/LinkField.tsx +++ b/src/components/common/LinkField.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useMemo } from '../../lib/teact/teact'; +import { memo, useMemo } from '../../lib/teact/teact'; import { getActions } from '../../global'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/common/ManageUsernames.tsx b/src/components/common/ManageUsernames.tsx index 77246501e..e835b88db 100644 --- a/src/components/common/ManageUsernames.tsx +++ b/src/components/common/ManageUsernames.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useState, } from '../../lib/teact/teact'; import { getActions } from '../../global'; diff --git a/src/components/common/Media.tsx b/src/components/common/Media.tsx index 49f898104..57c662b79 100644 --- a/src/components/common/Media.tsx +++ b/src/components/common/Media.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useRef } from '../../lib/teact/teact'; +import { memo, useRef } from '../../lib/teact/teact'; import type { ApiMessage } from '../../api/types'; import type { ObserveFn } from '../../hooks/useIntersectionObserver'; diff --git a/src/components/common/MediaSpoiler.tsx b/src/components/common/MediaSpoiler.tsx index b5f35410a..623919188 100644 --- a/src/components/common/MediaSpoiler.tsx +++ b/src/components/common/MediaSpoiler.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useRef } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo, useRef } from '../../lib/teact/teact'; import { requestMutation } from '../../lib/fasterdom/fasterdom'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/common/MessageLink.tsx b/src/components/common/MessageLink.tsx index af67691a8..8fd98b5f9 100644 --- a/src/components/common/MessageLink.tsx +++ b/src/components/common/MessageLink.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { useCallback } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { useCallback } from '../../lib/teact/teact'; import { getActions } from '../../global'; import type { ApiMessage } from '../../api/types'; diff --git a/src/components/common/MessageOutgoingStatus.tsx b/src/components/common/MessageOutgoingStatus.tsx index 17d3341fa..f483d107d 100644 --- a/src/components/common/MessageOutgoingStatus.tsx +++ b/src/components/common/MessageOutgoingStatus.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import type { ApiMessageOutgoingStatus } from '../../api/types'; diff --git a/src/components/common/MessageSummary.tsx b/src/components/common/MessageSummary.tsx index 8f2527f63..3930d4596 100644 --- a/src/components/common/MessageSummary.tsx +++ b/src/components/common/MessageSummary.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import { withGlobal } from '../../global'; import type { diff --git a/src/components/common/MessageText.tsx b/src/components/common/MessageText.tsx index e617ee6cd..c26bff737 100644 --- a/src/components/common/MessageText.tsx +++ b/src/components/common/MessageText.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useMemo, useRef, } from '../../lib/teact/teact'; diff --git a/src/components/common/MiniTable.tsx b/src/components/common/MiniTable.tsx index 4ba6051ab..7ad2bea87 100644 --- a/src/components/common/MiniTable.tsx +++ b/src/components/common/MiniTable.tsx @@ -1,4 +1,4 @@ -import React, { memo, type TeactNode } from '../../lib/teact/teact'; +import { memo, type TeactNode } from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/common/NothingFound.tsx b/src/components/common/NothingFound.tsx index 4a9dd7527..89261ec41 100644 --- a/src/components/common/NothingFound.tsx +++ b/src/components/common/NothingFound.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; import renderText from './helpers/renderText'; diff --git a/src/components/common/PasswordForm.tsx b/src/components/common/PasswordForm.tsx index 4d6a81844..0e3bdca1c 100644 --- a/src/components/common/PasswordForm.tsx +++ b/src/components/common/PasswordForm.tsx @@ -1,6 +1,7 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useRef, useState, } from '../../lib/teact/teact'; diff --git a/src/components/common/PasswordMonkey.tsx b/src/components/common/PasswordMonkey.tsx index f751a39dc..027a35e03 100644 --- a/src/components/common/PasswordMonkey.tsx +++ b/src/components/common/PasswordMonkey.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback } from '../../lib/teact/teact'; +import { memo, useCallback } from '../../lib/teact/teact'; import { STICKER_SIZE_AUTH, STICKER_SIZE_AUTH_MOBILE, STICKER_SIZE_TWO_FA } from '../../config'; import { LOCAL_TGS_URLS } from './helpers/animatedAssets'; diff --git a/src/components/common/PaymentMessageConfirmDialog.tsx b/src/components/common/PaymentMessageConfirmDialog.tsx index 10a92fc7c..015b13a55 100644 --- a/src/components/common/PaymentMessageConfirmDialog.tsx +++ b/src/components/common/PaymentMessageConfirmDialog.tsx @@ -1,5 +1,5 @@ import type { FC, StateHookSetter } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import { formatStarsAsText } from '../../util/localization/format'; diff --git a/src/components/common/PeerBadge.tsx b/src/components/common/PeerBadge.tsx index 2d3146276..69d586037 100644 --- a/src/components/common/PeerBadge.tsx +++ b/src/components/common/PeerBadge.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import type { ApiPeer, ApiWebDocument } from '../../api/types'; import type { CustomPeer } from '../../types'; diff --git a/src/components/common/PeerChip.tsx b/src/components/common/PeerChip.tsx index 18a361d87..092949529 100644 --- a/src/components/common/PeerChip.tsx +++ b/src/components/common/PeerChip.tsx @@ -1,5 +1,5 @@ import type { TeactNode } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import { withGlobal } from '../../global'; import type { ApiPeer } from '../../api/types'; diff --git a/src/components/common/PeerColorWrapper.tsx b/src/components/common/PeerColorWrapper.tsx index a03a40780..0eca48dcd 100644 --- a/src/components/common/PeerColorWrapper.tsx +++ b/src/components/common/PeerColorWrapper.tsx @@ -1,5 +1,6 @@ import type { ElementRef } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import type { ApiPeer, ApiPeerColor } from '../../api/types'; diff --git a/src/components/common/PinMessageModal.async.tsx b/src/components/common/PinMessageModal.async.tsx index 7ddd854ab..69383907d 100644 --- a/src/components/common/PinMessageModal.async.tsx +++ b/src/components/common/PinMessageModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './PinMessageModal'; diff --git a/src/components/common/PinMessageModal.tsx b/src/components/common/PinMessageModal.tsx index 5f80620a7..7cf7080d2 100644 --- a/src/components/common/PinMessageModal.tsx +++ b/src/components/common/PinMessageModal.tsx @@ -1,4 +1,4 @@ -import React, { memo, useState } from '../../lib/teact/teact'; +import { memo, useState } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import { diff --git a/src/components/common/PremiumProgress.tsx b/src/components/common/PremiumProgress.tsx index 06d84e922..f2a899768 100644 --- a/src/components/common/PremiumProgress.tsx +++ b/src/components/common/PremiumProgress.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useEffect, useRef, useState, } from '../../lib/teact/teact'; diff --git a/src/components/common/PreviewMedia.tsx b/src/components/common/PreviewMedia.tsx index 2a037a259..ef3a334cf 100644 --- a/src/components/common/PreviewMedia.tsx +++ b/src/components/common/PreviewMedia.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useRef } from '../../lib/teact/teact'; +import { memo, useRef } from '../../lib/teact/teact'; import type { ApiBotPreviewMedia } from '../../api/types'; import type { ObserveFn } from '../../hooks/useIntersectionObserver'; diff --git a/src/components/common/PrivacySettingsNoticeModal.async.tsx b/src/components/common/PrivacySettingsNoticeModal.async.tsx index 04bf503b3..9357d87fc 100644 --- a/src/components/common/PrivacySettingsNoticeModal.async.tsx +++ b/src/components/common/PrivacySettingsNoticeModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './PrivacySettingsNoticeModal'; diff --git a/src/components/common/PrivacySettingsNoticeModal.tsx b/src/components/common/PrivacySettingsNoticeModal.tsx index 10c0fa7a3..8e1ad07d6 100644 --- a/src/components/common/PrivacySettingsNoticeModal.tsx +++ b/src/components/common/PrivacySettingsNoticeModal.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { ApiUser } from '../../api/types'; diff --git a/src/components/common/PrivateChatInfo.tsx b/src/components/common/PrivateChatInfo.tsx index 04cb974f7..f437f37fd 100644 --- a/src/components/common/PrivateChatInfo.tsx +++ b/src/components/common/PrivateChatInfo.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useEffect, useMemo } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useMemo } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { diff --git a/src/components/common/ProfileInfo.tsx b/src/components/common/ProfileInfo.tsx index e402ccafb..23ee41083 100644 --- a/src/components/common/ProfileInfo.tsx +++ b/src/components/common/ProfileInfo.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useEffect, useState } from '../../lib/teact/teact'; +import { memo, useEffect, useState } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { diff --git a/src/components/common/ProfilePhoto.tsx b/src/components/common/ProfilePhoto.tsx index ba8497c14..e1d576732 100644 --- a/src/components/common/ProfilePhoto.tsx +++ b/src/components/common/ProfilePhoto.tsx @@ -1,5 +1,5 @@ import type { FC, TeactNode } from '../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, } from '../../lib/teact/teact'; diff --git a/src/components/common/RecipientPicker.tsx b/src/components/common/RecipientPicker.tsx index 69af6832a..d3c7e0d3f 100644 --- a/src/components/common/RecipientPicker.tsx +++ b/src/components/common/RecipientPicker.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useMemo, useState } from '../../lib/teact/teact'; +import { memo, useMemo, useState } from '../../lib/teact/teact'; import { getGlobal, withGlobal } from '../../global'; import type { ApiChatType } from '../../api/types'; diff --git a/src/components/common/ReportAvatarModal.tsx b/src/components/common/ReportAvatarModal.tsx index 634b6e35e..9a94344df 100644 --- a/src/components/common/ReportAvatarModal.tsx +++ b/src/components/common/ReportAvatarModal.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../lib/teact/teact'; -import React, { memo, useMemo, useState } from '../../lib/teact/teact'; +import { memo, useMemo, useState } from '../../lib/teact/teact'; import { getActions } from '../../global'; import type { ApiPhoto, ApiReportReason } from '../../api/types'; diff --git a/src/components/common/SafeLink.tsx b/src/components/common/SafeLink.tsx index e00c4b7b3..739248d84 100644 --- a/src/components/common/SafeLink.tsx +++ b/src/components/common/SafeLink.tsx @@ -1,5 +1,5 @@ import type { TeactNode } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; import { getActions } from '../../global'; import { ApiMessageEntityTypes } from '../../api/types'; diff --git a/src/components/common/SeenByModal.async.tsx b/src/components/common/SeenByModal.async.tsx index 12d272ca0..e347c39f5 100644 --- a/src/components/common/SeenByModal.async.tsx +++ b/src/components/common/SeenByModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './SeenByModal'; diff --git a/src/components/common/SeenByModal.tsx b/src/components/common/SeenByModal.tsx index 339c857e1..8b5500c3a 100644 --- a/src/components/common/SeenByModal.tsx +++ b/src/components/common/SeenByModal.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo } from '../../lib/teact/teact'; +import { memo, useMemo } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import { selectChatMessage, selectTabState } from '../../global/selectors'; diff --git a/src/components/common/SliderDots.tsx b/src/components/common/SliderDots.tsx index 9d566241d..9d6438ffd 100644 --- a/src/components/common/SliderDots.tsx +++ b/src/components/common/SliderDots.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback } from '../../lib/teact/teact'; +import { memo, useCallback } from '../../lib/teact/teact'; import { IS_TOUCH_ENV } from '../../util/browser/windowEnvironment'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/common/Sparkles.tsx b/src/components/common/Sparkles.tsx index ec1427f2b..e7c3a2e43 100644 --- a/src/components/common/Sparkles.tsx +++ b/src/components/common/Sparkles.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; import buildStyle from '../../util/buildStyle'; diff --git a/src/components/common/StickerButton.tsx b/src/components/common/StickerButton.tsx index 38f5bceec..4824e5f06 100644 --- a/src/components/common/StickerButton.tsx +++ b/src/components/common/StickerButton.tsx @@ -1,7 +1,8 @@ import type { MouseEvent as ReactMouseEvent, ReactNode } from 'react'; import type { ElementRef } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useMemo, useRef, } from '../../lib/teact/teact'; import { getActions } from '../../global'; diff --git a/src/components/common/StickerSet.tsx b/src/components/common/StickerSet.tsx index 93f828d12..6c37e8b0b 100644 --- a/src/components/common/StickerSet.tsx +++ b/src/components/common/StickerSet.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, useState, } from '../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../global'; diff --git a/src/components/common/StickerSetCard.tsx b/src/components/common/StickerSetCard.tsx index 8e27894ab..d36a99729 100644 --- a/src/components/common/StickerSetCard.tsx +++ b/src/components/common/StickerSetCard.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import type { ApiSticker, ApiStickerSet } from '../../api/types'; import type { ObserveFn } from '../../hooks/useIntersectionObserver'; diff --git a/src/components/common/StickerSetModal.async.tsx b/src/components/common/StickerSetModal.async.tsx index 3b414add2..4466b217d 100644 --- a/src/components/common/StickerSetModal.async.tsx +++ b/src/components/common/StickerSetModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './StickerSetModal'; diff --git a/src/components/common/StickerSetModal.tsx b/src/components/common/StickerSetModal.tsx index 481a2d349..519bdd094 100644 --- a/src/components/common/StickerSetModal.tsx +++ b/src/components/common/StickerSetModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useRef, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/common/StickerView.tsx b/src/components/common/StickerView.tsx index 7c217ba1c..b6c9b1fa0 100644 --- a/src/components/common/StickerView.tsx +++ b/src/components/common/StickerView.tsx @@ -1,5 +1,5 @@ import type { ElementRef, FC } from '../../lib/teact/teact'; -import React, { memo, useMemo, useRef } from '../../lib/teact/teact'; +import { memo, useMemo, useRef } from '../../lib/teact/teact'; import { getGlobal } from '../../global'; import type { ApiSticker } from '../../api/types'; diff --git a/src/components/common/TopicChip.tsx b/src/components/common/TopicChip.tsx index c72e2b768..a5a16d56b 100644 --- a/src/components/common/TopicChip.tsx +++ b/src/components/common/TopicChip.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import type { ApiTopic } from '../../api/types'; diff --git a/src/components/common/TopicDefaultIcon.tsx b/src/components/common/TopicDefaultIcon.tsx index f8c96f5d8..b661a5c8e 100644 --- a/src/components/common/TopicDefaultIcon.tsx +++ b/src/components/common/TopicDefaultIcon.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import type { ThreadId } from '../../types'; diff --git a/src/components/common/TopicIcon.tsx b/src/components/common/TopicIcon.tsx index ab218d539..d7bf57d07 100644 --- a/src/components/common/TopicIcon.tsx +++ b/src/components/common/TopicIcon.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import type { ApiTopic } from '../../api/types'; import type { ObserveFn } from '../../hooks/useIntersectionObserver'; diff --git a/src/components/common/TrackingMonkey.tsx b/src/components/common/TrackingMonkey.tsx index 9cad3b81c..291c8cfd3 100644 --- a/src/components/common/TrackingMonkey.tsx +++ b/src/components/common/TrackingMonkey.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback, useState } from '../../lib/teact/teact'; +import { memo, useCallback, useState } from '../../lib/teact/teact'; import { STICKER_SIZE_AUTH, STICKER_SIZE_AUTH_MOBILE, STICKER_SIZE_TWO_FA } from '../../config'; import { LOCAL_TGS_URLS } from './helpers/animatedAssets'; diff --git a/src/components/common/TypingStatus.tsx b/src/components/common/TypingStatus.tsx index 11da6586a..b51b498c3 100644 --- a/src/components/common/TypingStatus.tsx +++ b/src/components/common/TypingStatus.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import { withGlobal } from '../../global'; import type { ApiTypingStatus, ApiUser } from '../../api/types'; diff --git a/src/components/common/UiLoader.tsx b/src/components/common/UiLoader.tsx index b7eb848ce..0090847dd 100644 --- a/src/components/common/UiLoader.tsx +++ b/src/components/common/UiLoader.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../global'; import type { TabState } from '../../global/types'; diff --git a/src/components/common/UnpinAllMessagesModal.async.tsx b/src/components/common/UnpinAllMessagesModal.async.tsx index 91d9a7578..671f671b1 100644 --- a/src/components/common/UnpinAllMessagesModal.async.tsx +++ b/src/components/common/UnpinAllMessagesModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './UnpinAllMessagesModal'; diff --git a/src/components/common/UnpinAllMessagesModal.tsx b/src/components/common/UnpinAllMessagesModal.tsx index ed6ebaaa0..accb28d34 100644 --- a/src/components/common/UnpinAllMessagesModal.tsx +++ b/src/components/common/UnpinAllMessagesModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import useOldLang from '../../hooks/useOldLang'; diff --git a/src/components/common/UnreadCounter.tsx b/src/components/common/UnreadCounter.tsx index d30c8611a..33f71b857 100644 --- a/src/components/common/UnreadCounter.tsx +++ b/src/components/common/UnreadCounter.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useEffect } from '../../lib/teact/teact'; +import { memo, useEffect } from '../../lib/teact/teact'; import { updateAppBadge } from '../../util/appBadge'; import { getAllNotificationsCount } from '../../util/folderManager'; diff --git a/src/components/common/UserLink.tsx b/src/components/common/UserLink.tsx index 3af0df2a4..6f6b5d02d 100644 --- a/src/components/common/UserLink.tsx +++ b/src/components/common/UserLink.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { useCallback } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { useCallback } from '../../lib/teact/teact'; import { getActions } from '../../global'; import type { ApiPeer } from '../../api/types'; diff --git a/src/components/common/UsernameInput.tsx b/src/components/common/UsernameInput.tsx index 14b61660d..6c88e5fe0 100644 --- a/src/components/common/UsernameInput.tsx +++ b/src/components/common/UsernameInput.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useCallback, useEffect, useMemo, useState, } from '../../lib/teact/teact'; import { getActions } from '../../global'; diff --git a/src/components/common/VerificationMonetizationModal.async.tsx b/src/components/common/VerificationMonetizationModal.async.tsx index 424f5dcb2..f2009773b 100644 --- a/src/components/common/VerificationMonetizationModal.async.tsx +++ b/src/components/common/VerificationMonetizationModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './VerificationMonetizationModal'; diff --git a/src/components/common/VerificationMonetizationModal.tsx b/src/components/common/VerificationMonetizationModal.tsx index 8eac2932f..7f604b22c 100644 --- a/src/components/common/VerificationMonetizationModal.tsx +++ b/src/components/common/VerificationMonetizationModal.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useState, } from '../../lib/teact/teact'; diff --git a/src/components/common/VerifiedIcon.tsx b/src/components/common/VerifiedIcon.tsx index 908f8dc92..6d025c39c 100644 --- a/src/components/common/VerifiedIcon.tsx +++ b/src/components/common/VerifiedIcon.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import './VerifiedIcon.scss'; diff --git a/src/components/common/WebLink.tsx b/src/components/common/WebLink.tsx index c85634bfd..69772bd25 100644 --- a/src/components/common/WebLink.tsx +++ b/src/components/common/WebLink.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import type { ApiMessage, ApiWebPage } from '../../api/types'; import type { ObserveFn } from '../../hooks/useIntersectionObserver'; diff --git a/src/components/common/code/CodeBlock.tsx b/src/components/common/code/CodeBlock.tsx index 29825b287..cd4bddc43 100644 --- a/src/components/common/code/CodeBlock.tsx +++ b/src/components/common/code/CodeBlock.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useState } from '../../../lib/teact/teact'; +import { memo, useCallback, useState } from '../../../lib/teact/teact'; import { ApiMessageEntityTypes } from '../../../api/types'; diff --git a/src/components/common/code/CodeOverlay.tsx b/src/components/common/code/CodeOverlay.tsx index 1777454bb..ddb08422e 100644 --- a/src/components/common/code/CodeOverlay.tsx +++ b/src/components/common/code/CodeOverlay.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useRef, useState, } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; diff --git a/src/components/common/embedded/EmbeddedMessage.tsx b/src/components/common/embedded/EmbeddedMessage.tsx index c1fd5fe38..f47173be4 100644 --- a/src/components/common/embedded/EmbeddedMessage.tsx +++ b/src/components/common/embedded/EmbeddedMessage.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { useMemo, useRef } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { useMemo, useRef } from '../../../lib/teact/teact'; import type { ApiChat, diff --git a/src/components/common/embedded/EmbeddedStory.tsx b/src/components/common/embedded/EmbeddedStory.tsx index 142203dee..0d12c3f5a 100644 --- a/src/components/common/embedded/EmbeddedStory.tsx +++ b/src/components/common/embedded/EmbeddedStory.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { useRef } from '../../../lib/teact/teact'; +import { useRef } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiPeer, ApiTypeStory } from '../../../api/types'; diff --git a/src/components/common/embedded/EmbeddedStoryForward.tsx b/src/components/common/embedded/EmbeddedStoryForward.tsx index 71c3eecf4..c5f85b510 100644 --- a/src/components/common/embedded/EmbeddedStoryForward.tsx +++ b/src/components/common/embedded/EmbeddedStoryForward.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useEffect, useRef } from '../../../lib/teact/teact'; +import { memo, useEffect, useRef } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { diff --git a/src/components/common/embedded/EmojiIconBackground.tsx b/src/components/common/embedded/EmojiIconBackground.tsx index a056eacdb..158693b73 100644 --- a/src/components/common/embedded/EmojiIconBackground.tsx +++ b/src/components/common/embedded/EmojiIconBackground.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useEffect, useRef, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/common/gift/GiftMenuItems.tsx b/src/components/common/gift/GiftMenuItems.tsx index b131ed07f..01fa8ddff 100644 --- a/src/components/common/gift/GiftMenuItems.tsx +++ b/src/components/common/gift/GiftMenuItems.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { diff --git a/src/components/common/gift/GiftRibbon.tsx b/src/components/common/gift/GiftRibbon.tsx index c57566e51..27b3e0d7e 100644 --- a/src/components/common/gift/GiftRibbon.tsx +++ b/src/components/common/gift/GiftRibbon.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { withGlobal } from '../../../global'; import type { ThemeKey } from '../../../types'; diff --git a/src/components/common/gift/GiftTransferPreview.tsx b/src/components/common/gift/GiftTransferPreview.tsx index 79f646ce2..71f9e7a3a 100644 --- a/src/components/common/gift/GiftTransferPreview.tsx +++ b/src/components/common/gift/GiftTransferPreview.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import type { ApiPeer, ApiStarGiftUnique, diff --git a/src/components/common/gift/SavedGift.tsx b/src/components/common/gift/SavedGift.tsx index 6760cd4b9..60b93d53f 100644 --- a/src/components/common/gift/SavedGift.tsx +++ b/src/components/common/gift/SavedGift.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo, useRef } from '../../../lib/teact/teact'; +import { memo, useMemo, useRef } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiEmojiStatusType, ApiPeer, ApiSavedStarGift } from '../../../api/types'; diff --git a/src/components/common/helpers/renderText.tsx b/src/components/common/helpers/renderText.tsx index 3b7c1ad96..a132cea63 100644 --- a/src/components/common/helpers/renderText.tsx +++ b/src/components/common/helpers/renderText.tsx @@ -1,5 +1,4 @@ import type { TeactNode } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { TextPart } from '../../../types'; diff --git a/src/components/common/helpers/renderTextWithEntities.tsx b/src/components/common/helpers/renderTextWithEntities.tsx index 7b1f0f249..74c24e2d1 100644 --- a/src/components/common/helpers/renderTextWithEntities.tsx +++ b/src/components/common/helpers/renderTextWithEntities.tsx @@ -1,5 +1,5 @@ import type { ElementRef } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiFormattedText, ApiMessageEntity } from '../../../api/types'; diff --git a/src/components/common/icons/Icon.tsx b/src/components/common/icons/Icon.tsx index b2c9de399..e33399728 100644 --- a/src/components/common/icons/Icon.tsx +++ b/src/components/common/icons/Icon.tsx @@ -1,6 +1,6 @@ import type { AriaRole } from 'react'; import type { ElementRef } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; import type { IconName } from '../../../types/icons'; diff --git a/src/components/common/icons/StarIcon.tsx b/src/components/common/icons/StarIcon.tsx index 2fe79b075..02d4cf82d 100644 --- a/src/components/common/icons/StarIcon.tsx +++ b/src/components/common/icons/StarIcon.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import buildClassName from '../../../util/buildClassName'; diff --git a/src/components/common/paidMessage/PaidMessagePrice.tsx b/src/components/common/paidMessage/PaidMessagePrice.tsx index 2b836fc15..ebdeeb707 100644 --- a/src/components/common/paidMessage/PaidMessagePrice.tsx +++ b/src/components/common/paidMessage/PaidMessagePrice.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/common/paidMessage/PaidMessageSlider.tsx b/src/components/common/paidMessage/PaidMessageSlider.tsx index 7f74096ac..2c6c014c8 100644 --- a/src/components/common/paidMessage/PaidMessageSlider.tsx +++ b/src/components/common/paidMessage/PaidMessageSlider.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import buildClassName from '../../../util/buildClassName'; import { formatStarsAsText } from '../../../util/localization/format'; diff --git a/src/components/common/pickers/ChatOrUserPicker.tsx b/src/components/common/pickers/ChatOrUserPicker.tsx index f7e2f87f5..1c67dc17d 100644 --- a/src/components/common/pickers/ChatOrUserPicker.tsx +++ b/src/components/common/pickers/ChatOrUserPicker.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useCallback, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, getGlobal } from '../../../global'; diff --git a/src/components/common/pickers/ItemPicker.tsx b/src/components/common/pickers/ItemPicker.tsx index 23ef89968..68fb6227b 100644 --- a/src/components/common/pickers/ItemPicker.tsx +++ b/src/components/common/pickers/ItemPicker.tsx @@ -1,5 +1,6 @@ import type { TeactNode } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useCallback, useEffect, useMemo, useRef, diff --git a/src/components/common/pickers/PeerPicker.tsx b/src/components/common/pickers/PeerPicker.tsx index cfde81a49..efe0a1085 100644 --- a/src/components/common/pickers/PeerPicker.tsx +++ b/src/components/common/pickers/PeerPicker.tsx @@ -1,4 +1,5 @@ -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useCallback, useEffect, useMemo, useRef, } from '../../../lib/teact/teact'; import { getGlobal } from '../../../global'; diff --git a/src/components/common/pickers/PickerItem.tsx b/src/components/common/pickers/PickerItem.tsx index b4dd644d9..fdb8158f7 100644 --- a/src/components/common/pickers/PickerItem.tsx +++ b/src/components/common/pickers/PickerItem.tsx @@ -1,4 +1,4 @@ -import React, { type TeactNode } from '../../../lib/teact/teact'; +import { type TeactNode } from '../../../lib/teact/teact'; import { IS_IOS } from '../../../util/browser/windowEnvironment'; import buildClassName from '../../../util/buildClassName'; diff --git a/src/components/common/pickers/PickerModal.tsx b/src/components/common/pickers/PickerModal.tsx index ea9d87543..2203f9b82 100644 --- a/src/components/common/pickers/PickerModal.tsx +++ b/src/components/common/pickers/PickerModal.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import buildClassName from '../../../util/buildClassName'; diff --git a/src/components/common/profile/BusinessHours.tsx b/src/components/common/profile/BusinessHours.tsx index 4e4ec2936..70c2581e6 100644 --- a/src/components/common/profile/BusinessHours.tsx +++ b/src/components/common/profile/BusinessHours.tsx @@ -1,4 +1,5 @@ -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useMemo, useRef, } from '../../../lib/teact/teact'; diff --git a/src/components/common/profile/ChatExtra.tsx b/src/components/common/profile/ChatExtra.tsx index 68f54da6d..74826b26b 100644 --- a/src/components/common/profile/ChatExtra.tsx +++ b/src/components/common/profile/ChatExtra.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useMemo, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/common/profile/RadialPatternBackground.tsx b/src/components/common/profile/RadialPatternBackground.tsx index ae63451ca..651e7eaeb 100644 --- a/src/components/common/profile/RadialPatternBackground.tsx +++ b/src/components/common/profile/RadialPatternBackground.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useEffect, useMemo, useRef, useSignal, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/common/profile/UserBirthday.tsx b/src/components/common/profile/UserBirthday.tsx index 3b2aa94c9..962a87412 100644 --- a/src/components/common/profile/UserBirthday.tsx +++ b/src/components/common/profile/UserBirthday.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useEffect, useMemo, useRef, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/common/reactions/CustomEmojiEffect.tsx b/src/components/common/reactions/CustomEmojiEffect.tsx index a742e7fd8..3d4d73e6c 100644 --- a/src/components/common/reactions/CustomEmojiEffect.tsx +++ b/src/components/common/reactions/CustomEmojiEffect.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import type { ApiEmojiStatusType, ApiReactionCustomEmoji } from '../../../api/types'; diff --git a/src/components/common/reactions/PaidReactionEmoji.tsx b/src/components/common/reactions/PaidReactionEmoji.tsx index fd78931c4..6adec1cbd 100644 --- a/src/components/common/reactions/PaidReactionEmoji.tsx +++ b/src/components/common/reactions/PaidReactionEmoji.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/common/reactions/ReactionAnimatedEmoji.tsx b/src/components/common/reactions/ReactionAnimatedEmoji.tsx index a8b0d6c02..f458257aa 100644 --- a/src/components/common/reactions/ReactionAnimatedEmoji.tsx +++ b/src/components/common/reactions/ReactionAnimatedEmoji.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useMemo, useRef, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/common/reactions/ReactionEmoji.tsx b/src/components/common/reactions/ReactionEmoji.tsx index 55b25595a..0bc79b2d1 100644 --- a/src/components/common/reactions/ReactionEmoji.tsx +++ b/src/components/common/reactions/ReactionEmoji.tsx @@ -1,5 +1,5 @@ import type { ElementRef, FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, } from '../../../lib/teact/teact'; diff --git a/src/components/common/reactions/ReactionStaticEmoji.tsx b/src/components/common/reactions/ReactionStaticEmoji.tsx index 83afbe7ad..00894bc92 100644 --- a/src/components/common/reactions/ReactionStaticEmoji.tsx +++ b/src/components/common/reactions/ReactionStaticEmoji.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import type { ApiAvailableReaction, ApiReaction } from '../../../api/types'; import type { ObserveFn } from '../../../hooks/useIntersectionObserver'; diff --git a/src/components/common/spoiler/Spoiler.tsx b/src/components/common/spoiler/Spoiler.tsx index fd2e75d4a..aed03c254 100644 --- a/src/components/common/spoiler/Spoiler.tsx +++ b/src/components/common/spoiler/Spoiler.tsx @@ -1,5 +1,6 @@ import type { TeactNode } from '../../../lib/teact/teact'; -import React, { memo, useEffect, useRef } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useRef } from '../../../lib/teact/teact'; import { ApiMessageEntityTypes } from '../../../api/types'; diff --git a/src/components/left/ArchivedChats.async.tsx b/src/components/left/ArchivedChats.async.tsx index f738e84ea..145474e34 100644 --- a/src/components/left/ArchivedChats.async.tsx +++ b/src/components/left/ArchivedChats.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './ArchivedChats'; diff --git a/src/components/left/ArchivedChats.tsx b/src/components/left/ArchivedChats.tsx index 98bfedaf8..3a04e65a9 100644 --- a/src/components/left/ArchivedChats.tsx +++ b/src/components/left/ArchivedChats.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import { getActions } from '../../global'; import type { GlobalState } from '../../global/types'; diff --git a/src/components/left/ChatFolderModal.async.tsx b/src/components/left/ChatFolderModal.async.tsx index 872c6328a..1d7896d23 100644 --- a/src/components/left/ChatFolderModal.async.tsx +++ b/src/components/left/ChatFolderModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './ChatFolderModal'; diff --git a/src/components/left/ChatFolderModal.tsx b/src/components/left/ChatFolderModal.tsx index ed87eef68..881644896 100644 --- a/src/components/left/ChatFolderModal.tsx +++ b/src/components/left/ChatFolderModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, useState, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/left/ConnectionStatusOverlay.tsx b/src/components/left/ConnectionStatusOverlay.tsx index 531e522a4..d45009422 100644 --- a/src/components/left/ConnectionStatusOverlay.tsx +++ b/src/components/left/ConnectionStatusOverlay.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import type { ConnectionStatus } from '../../hooks/useConnectionStatus'; diff --git a/src/components/left/LeftColumn.tsx b/src/components/left/LeftColumn.tsx index 91ee3c7ab..c26ee1f1a 100644 --- a/src/components/left/LeftColumn.tsx +++ b/src/components/left/LeftColumn.tsx @@ -1,6 +1,6 @@ import type { ElementRef } from '../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useState, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/left/MuteChatModal.async.tsx b/src/components/left/MuteChatModal.async.tsx index ae2f12d4c..e06da3f11 100644 --- a/src/components/left/MuteChatModal.async.tsx +++ b/src/components/left/MuteChatModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './MuteChatModal'; diff --git a/src/components/left/MuteChatModal.tsx b/src/components/left/MuteChatModal.tsx index 8b93e8207..98e3ffbb5 100644 --- a/src/components/left/MuteChatModal.tsx +++ b/src/components/left/MuteChatModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, useState, } from '../../lib/teact/teact'; import { getActions } from '../../global'; diff --git a/src/components/left/NewChatButton.tsx b/src/components/left/NewChatButton.tsx index 735f1a633..0bacee5e4 100644 --- a/src/components/left/NewChatButton.tsx +++ b/src/components/left/NewChatButton.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { useCallback, useEffect, useMemo, useState, } from '../../lib/teact/teact'; import { getActions } from '../../global'; diff --git a/src/components/left/main/AccountMenuItems.tsx b/src/components/left/main/AccountMenuItems.tsx index 071887c60..60317d4a5 100644 --- a/src/components/left/main/AccountMenuItems.tsx +++ b/src/components/left/main/AccountMenuItems.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiUser } from '../../../api/types'; diff --git a/src/components/left/main/Archive.tsx b/src/components/left/main/Archive.tsx index 819151ae7..24ab54145 100644 --- a/src/components/left/main/Archive.tsx +++ b/src/components/left/main/Archive.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useMemo } from '../../../lib/teact/teact'; +import { memo, useCallback, useMemo } from '../../../lib/teact/teact'; import { getActions, getGlobal } from '../../../global'; import type { GlobalState } from '../../../global/types'; diff --git a/src/components/left/main/Chat.tsx b/src/components/left/main/Chat.tsx index e2ae7593f..6dafec810 100644 --- a/src/components/left/main/Chat.tsx +++ b/src/components/left/main/Chat.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useEffect, useMemo } from '../../../lib/teact/teact'; +import { memo, useEffect, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { diff --git a/src/components/left/main/ChatBadge.tsx b/src/components/left/main/ChatBadge.tsx index 3d4285222..dbe376f09 100644 --- a/src/components/left/main/ChatBadge.tsx +++ b/src/components/left/main/ChatBadge.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiChat, ApiTopic } from '../../../api/types'; diff --git a/src/components/left/main/ChatCallStatus.tsx b/src/components/left/main/ChatCallStatus.tsx index 717bf5442..bbb4aac58 100644 --- a/src/components/left/main/ChatCallStatus.tsx +++ b/src/components/left/main/ChatCallStatus.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import buildClassName from '../../../util/buildClassName'; diff --git a/src/components/left/main/ChatFolders.tsx b/src/components/left/main/ChatFolders.tsx index a42c9aefd..4d1e86489 100644 --- a/src/components/left/main/ChatFolders.tsx +++ b/src/components/left/main/ChatFolders.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; diff --git a/src/components/left/main/ChatList.tsx b/src/components/left/main/ChatList.tsx index 490ca4a46..c83ef4620 100644 --- a/src/components/left/main/ChatList.tsx +++ b/src/components/left/main/ChatList.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; diff --git a/src/components/left/main/ContactList.async.tsx b/src/components/left/main/ContactList.async.tsx index c3756fe2a..dc206a9d6 100644 --- a/src/components/left/main/ContactList.async.tsx +++ b/src/components/left/main/ContactList.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './ContactList'; diff --git a/src/components/left/main/ContactList.tsx b/src/components/left/main/ContactList.tsx index 552ed1584..62b2c6205 100644 --- a/src/components/left/main/ContactList.tsx +++ b/src/components/left/main/ContactList.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useMemo } from '../../../lib/teact/teact'; +import { memo, useCallback, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiUser, ApiUserStatus } from '../../../api/types'; diff --git a/src/components/left/main/EmptyFolder.tsx b/src/components/left/main/EmptyFolder.tsx index 99fbc2e38..b0d921bfb 100644 --- a/src/components/left/main/EmptyFolder.tsx +++ b/src/components/left/main/EmptyFolder.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback } from '../../../lib/teact/teact'; +import { memo, useCallback } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiChatFolder, ApiSticker } from '../../../api/types'; diff --git a/src/components/left/main/EmptyForum.tsx b/src/components/left/main/EmptyForum.tsx index ea297e29e..e1b6430f9 100644 --- a/src/components/left/main/EmptyForum.tsx +++ b/src/components/left/main/EmptyForum.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback } from '../../../lib/teact/teact'; +import { memo, useCallback } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiSticker } from '../../../api/types'; diff --git a/src/components/left/main/ForumPanel.tsx b/src/components/left/main/ForumPanel.tsx index 8b0dfcc93..3c39875d1 100644 --- a/src/components/left/main/ForumPanel.tsx +++ b/src/components/left/main/ForumPanel.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { beginHeavyAnimation, memo, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/left/main/FrozenAccountNotification.tsx b/src/components/left/main/FrozenAccountNotification.tsx index cf1f0a43f..d98be9f04 100644 --- a/src/components/left/main/FrozenAccountNotification.tsx +++ b/src/components/left/main/FrozenAccountNotification.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import useLang from '../../../hooks/useLang'; diff --git a/src/components/left/main/LeftMain.tsx b/src/components/left/main/LeftMain.tsx index 8b13e18a6..e4528bfe3 100644 --- a/src/components/left/main/LeftMain.tsx +++ b/src/components/left/main/LeftMain.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useRef, useState, } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; diff --git a/src/components/left/main/LeftMainHeader.tsx b/src/components/left/main/LeftMainHeader.tsx index e24d46614..a8da9d301 100644 --- a/src/components/left/main/LeftMainHeader.tsx +++ b/src/components/left/main/LeftMainHeader.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/left/main/LeftSideMenuItems.tsx b/src/components/left/main/LeftSideMenuItems.tsx index ec2cc83c9..f31ca9b6e 100644 --- a/src/components/left/main/LeftSideMenuItems.tsx +++ b/src/components/left/main/LeftSideMenuItems.tsx @@ -1,4 +1,5 @@ -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiUser } from '../../../api/types'; diff --git a/src/components/left/main/StatusButton.tsx b/src/components/left/main/StatusButton.tsx index 73659f86d..67a80aeb3 100644 --- a/src/components/left/main/StatusButton.tsx +++ b/src/components/left/main/StatusButton.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useRef } from '../../../lib/teact/teact'; +import { memo, useCallback, useRef } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiEmojiStatusCollectible, ApiEmojiStatusType, ApiSticker } from '../../../api/types'; diff --git a/src/components/left/main/StatusPickerMenu.async.tsx b/src/components/left/main/StatusPickerMenu.async.tsx index 25f7f002b..698832d09 100644 --- a/src/components/left/main/StatusPickerMenu.async.tsx +++ b/src/components/left/main/StatusPickerMenu.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './StatusPickerMenu'; diff --git a/src/components/left/main/StatusPickerMenu.tsx b/src/components/left/main/StatusPickerMenu.tsx index 7b193ddf1..ed03cf2dd 100644 --- a/src/components/left/main/StatusPickerMenu.tsx +++ b/src/components/left/main/StatusPickerMenu.tsx @@ -1,5 +1,5 @@ import type { ElementRef, FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useRef, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/left/main/Topic.tsx b/src/components/left/main/Topic.tsx index ca7c12845..140f51862 100644 --- a/src/components/left/main/Topic.tsx +++ b/src/components/left/main/Topic.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { diff --git a/src/components/left/main/UnconfirmedSession.tsx b/src/components/left/main/UnconfirmedSession.tsx index 3eff3353f..bf1ef7d8c 100644 --- a/src/components/left/main/UnconfirmedSession.tsx +++ b/src/components/left/main/UnconfirmedSession.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo, useRef } from '../../../lib/teact/teact'; +import { memo, useMemo, useRef } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiSession } from '../../../api/types'; diff --git a/src/components/left/main/hooks/useChatListEntry.tsx b/src/components/left/main/hooks/useChatListEntry.tsx index 3c6e8fc44..a0b4f6358 100644 --- a/src/components/left/main/hooks/useChatListEntry.tsx +++ b/src/components/left/main/hooks/useChatListEntry.tsx @@ -1,4 +1,4 @@ -import React, { +import { useCallback, useLayoutEffect, useRef, } from '../../../../lib/teact/teact'; diff --git a/src/components/left/newChat/NewChat.async.tsx b/src/components/left/newChat/NewChat.async.tsx index 89673582b..b38ac57b0 100644 --- a/src/components/left/newChat/NewChat.async.tsx +++ b/src/components/left/newChat/NewChat.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './NewChat'; diff --git a/src/components/left/newChat/NewChat.tsx b/src/components/left/newChat/NewChat.tsx index 8c7660883..0ce4abafb 100644 --- a/src/components/left/newChat/NewChat.tsx +++ b/src/components/left/newChat/NewChat.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useState } from '../../../lib/teact/teact'; +import { memo, useCallback, useState } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import { LeftColumnContent } from '../../../types'; diff --git a/src/components/left/newChat/NewChatStep1.tsx b/src/components/left/newChat/NewChatStep1.tsx index 8f677db17..492012514 100644 --- a/src/components/left/newChat/NewChatStep1.tsx +++ b/src/components/left/newChat/NewChatStep1.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useMemo } from '../../../lib/teact/teact'; +import { memo, useCallback, useMemo } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; import { isUserBot } from '../../../global/helpers'; diff --git a/src/components/left/newChat/NewChatStep2.tsx b/src/components/left/newChat/NewChatStep2.tsx index f31f8b45a..2451ad5fe 100644 --- a/src/components/left/newChat/NewChatStep2.tsx +++ b/src/components/left/newChat/NewChatStep2.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useCallback, useEffect, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/left/search/AudioResults.tsx b/src/components/left/search/AudioResults.tsx index 3debf1efd..aa691a466 100644 --- a/src/components/left/search/AudioResults.tsx +++ b/src/components/left/search/AudioResults.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useMemo } from '../../../lib/teact/teact'; +import { memo, useCallback, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiMessage } from '../../../api/types'; diff --git a/src/components/left/search/BotAppResults.tsx b/src/components/left/search/BotAppResults.tsx index eff9b8520..49c181463 100644 --- a/src/components/left/search/BotAppResults.tsx +++ b/src/components/left/search/BotAppResults.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, useRef, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/left/search/ChatMessage.tsx b/src/components/left/search/ChatMessage.tsx index 106a1170b..0be2fd9df 100644 --- a/src/components/left/search/ChatMessage.tsx +++ b/src/components/left/search/ChatMessage.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { diff --git a/src/components/left/search/ChatMessageResults.tsx b/src/components/left/search/ChatMessageResults.tsx index 58591e7e7..7f694dac8 100644 --- a/src/components/left/search/ChatMessageResults.tsx +++ b/src/components/left/search/ChatMessageResults.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useMemo } from '../../../lib/teact/teact'; +import { memo, useCallback, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiChat, ApiMessage } from '../../../api/types'; diff --git a/src/components/left/search/ChatResults.tsx b/src/components/left/search/ChatResults.tsx index c1f4b5d51..2b367c195 100644 --- a/src/components/left/search/ChatResults.tsx +++ b/src/components/left/search/ChatResults.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useCallback, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/left/search/DateSuggest.tsx b/src/components/left/search/DateSuggest.tsx index cb64c0005..1c6d413b0 100644 --- a/src/components/left/search/DateSuggest.tsx +++ b/src/components/left/search/DateSuggest.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import { formatDateToString } from '../../../util/dates/dateFormat'; diff --git a/src/components/left/search/FileResults.tsx b/src/components/left/search/FileResults.tsx index a91506b01..256ea8b98 100644 --- a/src/components/left/search/FileResults.tsx +++ b/src/components/left/search/FileResults.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, useRef, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/left/search/LeftSearch.async.tsx b/src/components/left/search/LeftSearch.async.tsx index 2c8a3d62b..a0b8afdf3 100644 --- a/src/components/left/search/LeftSearch.async.tsx +++ b/src/components/left/search/LeftSearch.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './LeftSearch'; diff --git a/src/components/left/search/LeftSearch.tsx b/src/components/left/search/LeftSearch.tsx index 193babab4..d7abb7103 100644 --- a/src/components/left/search/LeftSearch.tsx +++ b/src/components/left/search/LeftSearch.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useMemo, useRef, diff --git a/src/components/left/search/LeftSearchResultChat.tsx b/src/components/left/search/LeftSearchResultChat.tsx index eb40b204b..a9a9ef8d6 100644 --- a/src/components/left/search/LeftSearchResultChat.tsx +++ b/src/components/left/search/LeftSearchResultChat.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo, useCallback } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiChat, ApiUser } from '../../../api/types'; diff --git a/src/components/left/search/LeftSearchResultSponsored.tsx b/src/components/left/search/LeftSearchResultSponsored.tsx index c8b970f41..4838a7148 100644 --- a/src/components/left/search/LeftSearchResultSponsored.tsx +++ b/src/components/left/search/LeftSearchResultSponsored.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useRef } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo, useRef } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiSponsoredPeer } from '../../../api/types'; diff --git a/src/components/left/search/LeftSearchResultTopic.tsx b/src/components/left/search/LeftSearchResultTopic.tsx index b6092bb6e..0a5303d66 100644 --- a/src/components/left/search/LeftSearchResultTopic.tsx +++ b/src/components/left/search/LeftSearchResultTopic.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback } from '../../../lib/teact/teact'; +import { memo, useCallback } from '../../../lib/teact/teact'; import { withGlobal } from '../../../global'; import type { ApiTopic } from '../../../api/types'; diff --git a/src/components/left/search/LinkResults.tsx b/src/components/left/search/LinkResults.tsx index c73922842..53375904b 100644 --- a/src/components/left/search/LinkResults.tsx +++ b/src/components/left/search/LinkResults.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, useRef, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/left/search/MediaResults.tsx b/src/components/left/search/MediaResults.tsx index b4ad7a11e..250630509 100644 --- a/src/components/left/search/MediaResults.tsx +++ b/src/components/left/search/MediaResults.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, useRef, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/left/search/RecentContacts.tsx b/src/components/left/search/RecentContacts.tsx index c600a4abb..433442a83 100644 --- a/src/components/left/search/RecentContacts.tsx +++ b/src/components/left/search/RecentContacts.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useRef, } from '../../../lib/teact/teact'; diff --git a/src/components/left/settings/BlockUserModal.tsx b/src/components/left/settings/BlockUserModal.tsx index e1a0b6d0b..3b1ba08ad 100644 --- a/src/components/left/settings/BlockUserModal.tsx +++ b/src/components/left/settings/BlockUserModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/left/settings/PremiumStatusItem.tsx b/src/components/left/settings/PremiumStatusItem.tsx index 6a63beb3c..85868c6f3 100644 --- a/src/components/left/settings/PremiumStatusItem.tsx +++ b/src/components/left/settings/PremiumStatusItem.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiPremiumSection } from '../../../api/types'; diff --git a/src/components/left/settings/PrivacyLockedOption.tsx b/src/components/left/settings/PrivacyLockedOption.tsx index 23861130f..7080daf6d 100644 --- a/src/components/left/settings/PrivacyLockedOption.tsx +++ b/src/components/left/settings/PrivacyLockedOption.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import buildClassName from '../../../util/buildClassName'; diff --git a/src/components/left/settings/PrivacyMessages.tsx b/src/components/left/settings/PrivacyMessages.tsx index d759c5fa8..de26eb398 100644 --- a/src/components/left/settings/PrivacyMessages.tsx +++ b/src/components/left/settings/PrivacyMessages.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useCallback, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/left/settings/Settings.async.tsx b/src/components/left/settings/Settings.async.tsx index fa4d98dbb..6884adaf3 100644 --- a/src/components/left/settings/Settings.async.tsx +++ b/src/components/left/settings/Settings.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './Settings'; diff --git a/src/components/left/settings/Settings.tsx b/src/components/left/settings/Settings.tsx index a7d4c7f3d..a317bae6b 100644 --- a/src/components/left/settings/Settings.tsx +++ b/src/components/left/settings/Settings.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useRef, useState } from '../../../lib/teact/teact'; +import { memo, useRef, useState } from '../../../lib/teact/teact'; import { getActions, getGlobal } from '../../../global'; import type { FolderEditDispatch, FoldersState } from '../../../hooks/reducers/useFoldersReducer'; diff --git a/src/components/left/settings/SettingsAcceptedGift.tsx b/src/components/left/settings/SettingsAcceptedGift.tsx index bbab0e199..3c013c743 100644 --- a/src/components/left/settings/SettingsAcceptedGift.tsx +++ b/src/components/left/settings/SettingsAcceptedGift.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiDisallowedGiftsSettings } from '../../../api/types'; diff --git a/src/components/left/settings/SettingsActiveSession.tsx b/src/components/left/settings/SettingsActiveSession.tsx index 0a3cb8a00..1017c3267 100644 --- a/src/components/left/settings/SettingsActiveSession.tsx +++ b/src/components/left/settings/SettingsActiveSession.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback } from '../../../lib/teact/teact'; +import { memo, useCallback } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiSession } from '../../../api/types'; diff --git a/src/components/left/settings/SettingsActiveSessions.tsx b/src/components/left/settings/SettingsActiveSessions.tsx index 7e53e8520..7e7668a06 100644 --- a/src/components/left/settings/SettingsActiveSessions.tsx +++ b/src/components/left/settings/SettingsActiveSessions.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/left/settings/SettingsActiveWebsite.tsx b/src/components/left/settings/SettingsActiveWebsite.tsx index 013ee1878..815c1b4e7 100644 --- a/src/components/left/settings/SettingsActiveWebsite.tsx +++ b/src/components/left/settings/SettingsActiveWebsite.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback } from '../../../lib/teact/teact'; +import { memo, useCallback } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiUser, ApiWebSession } from '../../../api/types'; diff --git a/src/components/left/settings/SettingsActiveWebsites.tsx b/src/components/left/settings/SettingsActiveWebsites.tsx index ec795b20b..6510576ca 100644 --- a/src/components/left/settings/SettingsActiveWebsites.tsx +++ b/src/components/left/settings/SettingsActiveWebsites.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useState, } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; diff --git a/src/components/left/settings/SettingsCustomEmoji.tsx b/src/components/left/settings/SettingsCustomEmoji.tsx index 5310880ec..5b8d70e95 100644 --- a/src/components/left/settings/SettingsCustomEmoji.tsx +++ b/src/components/left/settings/SettingsCustomEmoji.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, useRef, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/left/settings/SettingsDataStorage.tsx b/src/components/left/settings/SettingsDataStorage.tsx index e34497f72..3ed4d2716 100644 --- a/src/components/left/settings/SettingsDataStorage.tsx +++ b/src/components/left/settings/SettingsDataStorage.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback } from '../../../lib/teact/teact'; +import { memo, useCallback } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { AccountSettings } from '../../../types'; diff --git a/src/components/left/settings/SettingsDoNotTranslate.tsx b/src/components/left/settings/SettingsDoNotTranslate.tsx index a14731687..c74afee25 100644 --- a/src/components/left/settings/SettingsDoNotTranslate.tsx +++ b/src/components/left/settings/SettingsDoNotTranslate.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/left/settings/SettingsEditProfile.tsx b/src/components/left/settings/SettingsEditProfile.tsx index f847ca9f3..5deceaddf 100644 --- a/src/components/left/settings/SettingsEditProfile.tsx +++ b/src/components/left/settings/SettingsEditProfile.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/left/settings/SettingsExperimental.tsx b/src/components/left/settings/SettingsExperimental.tsx index 9149c2a5c..5e5f1548e 100644 --- a/src/components/left/settings/SettingsExperimental.tsx +++ b/src/components/left/settings/SettingsExperimental.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useCallback, useEffect, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/left/settings/SettingsGeneral.tsx b/src/components/left/settings/SettingsGeneral.tsx index 7f55c2254..002ea7577 100644 --- a/src/components/left/settings/SettingsGeneral.tsx +++ b/src/components/left/settings/SettingsGeneral.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/left/settings/SettingsGeneralBackground.tsx b/src/components/left/settings/SettingsGeneralBackground.tsx index 91b40a27c..7012d191e 100644 --- a/src/components/left/settings/SettingsGeneralBackground.tsx +++ b/src/components/left/settings/SettingsGeneralBackground.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useCallback, useEffect, useRef, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/left/settings/SettingsGeneralBackgroundColor.tsx b/src/components/left/settings/SettingsGeneralBackgroundColor.tsx index 76ebcdef1..0a1d89ad6 100644 --- a/src/components/left/settings/SettingsGeneralBackgroundColor.tsx +++ b/src/components/left/settings/SettingsGeneralBackgroundColor.tsx @@ -1,6 +1,7 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useCallback, useEffect, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/left/settings/SettingsHeader.tsx b/src/components/left/settings/SettingsHeader.tsx index 4bb88723a..f54fa404f 100644 --- a/src/components/left/settings/SettingsHeader.tsx +++ b/src/components/left/settings/SettingsHeader.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; diff --git a/src/components/left/settings/SettingsLanguage.tsx b/src/components/left/settings/SettingsLanguage.tsx index 1b83136cb..606945242 100644 --- a/src/components/left/settings/SettingsLanguage.tsx +++ b/src/components/left/settings/SettingsLanguage.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/left/settings/SettingsMain.tsx b/src/components/left/settings/SettingsMain.tsx index c0450e744..30a917424 100644 --- a/src/components/left/settings/SettingsMain.tsx +++ b/src/components/left/settings/SettingsMain.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useEffect } from '../../../lib/teact/teact'; +import { memo, useEffect } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiStarsAmount } from '../../../api/types'; diff --git a/src/components/left/settings/SettingsNotifications.tsx b/src/components/left/settings/SettingsNotifications.tsx index 3f5d10e69..7d76fc555 100644 --- a/src/components/left/settings/SettingsNotifications.tsx +++ b/src/components/left/settings/SettingsNotifications.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useEffect } from '../../../lib/teact/teact'; +import { memo, useCallback, useEffect } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiNotifyPeerType, ApiPeerNotifySettings } from '../../../api/types'; diff --git a/src/components/left/settings/SettingsPasswordForm.tsx b/src/components/left/settings/SettingsPasswordForm.tsx index dcf451077..b71def335 100644 --- a/src/components/left/settings/SettingsPasswordForm.tsx +++ b/src/components/left/settings/SettingsPasswordForm.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useState } from '../../../lib/teact/teact'; +import { memo, useCallback, useState } from '../../../lib/teact/teact'; import useHistoryBack from '../../../hooks/useHistoryBack'; import useOldLang from '../../../hooks/useOldLang'; diff --git a/src/components/left/settings/SettingsPerformance.tsx b/src/components/left/settings/SettingsPerformance.tsx index 4007e319b..bbf89cb5f 100644 --- a/src/components/left/settings/SettingsPerformance.tsx +++ b/src/components/left/settings/SettingsPerformance.tsx @@ -1,4 +1,5 @@ -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useCallback, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/left/settings/SettingsPrivacy.tsx b/src/components/left/settings/SettingsPrivacy.tsx index 96d6c4045..31b992081 100644 --- a/src/components/left/settings/SettingsPrivacy.tsx +++ b/src/components/left/settings/SettingsPrivacy.tsx @@ -1,6 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import { useMemo } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useEffect } from '../../../lib/teact/teact'; +import { memo, useCallback, useEffect, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiPrivacySettings } from '../../../api/types'; diff --git a/src/components/left/settings/SettingsPrivacyBlockedUsers.tsx b/src/components/left/settings/SettingsPrivacyBlockedUsers.tsx index 55d8f964b..e5e6b7f47 100644 --- a/src/components/left/settings/SettingsPrivacyBlockedUsers.tsx +++ b/src/components/left/settings/SettingsPrivacyBlockedUsers.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useMemo } from '../../../lib/teact/teact'; +import { memo, useCallback, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiChat, ApiCountryCode, ApiUser } from '../../../api/types'; diff --git a/src/components/left/settings/SettingsPrivacyLastSeen.tsx b/src/components/left/settings/SettingsPrivacyLastSeen.tsx index 7e979e1a3..cb95640d9 100644 --- a/src/components/left/settings/SettingsPrivacyLastSeen.tsx +++ b/src/components/left/settings/SettingsPrivacyLastSeen.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { PrivacyVisibility } from '../../../api/types'; diff --git a/src/components/left/settings/SettingsPrivacyPublicProfilePhoto.tsx b/src/components/left/settings/SettingsPrivacyPublicProfilePhoto.tsx index bef65fe22..5f12d4e4c 100644 --- a/src/components/left/settings/SettingsPrivacyPublicProfilePhoto.tsx +++ b/src/components/left/settings/SettingsPrivacyPublicProfilePhoto.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useRef, } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; diff --git a/src/components/left/settings/SettingsPrivacyVisibility.tsx b/src/components/left/settings/SettingsPrivacyVisibility.tsx index 172459541..1a02021bc 100644 --- a/src/components/left/settings/SettingsPrivacyVisibility.tsx +++ b/src/components/left/settings/SettingsPrivacyVisibility.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useMemo } from '../../../lib/teact/teact'; +import { memo, useCallback, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiPhoto, ApiPrivacySettings, BotsPrivacyType } from '../../../api/types'; diff --git a/src/components/left/settings/SettingsPrivacyVisibilityExceptionList.tsx b/src/components/left/settings/SettingsPrivacyVisibilityExceptionList.tsx index c54cd8e62..0a5998f66 100644 --- a/src/components/left/settings/SettingsPrivacyVisibilityExceptionList.tsx +++ b/src/components/left/settings/SettingsPrivacyVisibilityExceptionList.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; diff --git a/src/components/left/settings/SettingsQuickReaction.tsx b/src/components/left/settings/SettingsQuickReaction.tsx index d568583b9..0279196ef 100644 --- a/src/components/left/settings/SettingsQuickReaction.tsx +++ b/src/components/left/settings/SettingsQuickReaction.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useMemo } from '../../../lib/teact/teact'; +import { memo, useCallback, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiAvailableReaction } from '../../../api/types'; diff --git a/src/components/left/settings/SettingsStickers.tsx b/src/components/left/settings/SettingsStickers.tsx index c7c8b3ece..e9fec00c1 100644 --- a/src/components/left/settings/SettingsStickers.tsx +++ b/src/components/left/settings/SettingsStickers.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, useRef, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/left/settings/WallpaperTile.tsx b/src/components/left/settings/WallpaperTile.tsx index 1418f4237..f7d3073c8 100644 --- a/src/components/left/settings/WallpaperTile.tsx +++ b/src/components/left/settings/WallpaperTile.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useRef, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/left/settings/folders/SettingsFolders.tsx b/src/components/left/settings/folders/SettingsFolders.tsx index 71f087465..dd1d562c9 100644 --- a/src/components/left/settings/folders/SettingsFolders.tsx +++ b/src/components/left/settings/folders/SettingsFolders.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo, useCallback } from '../../../../lib/teact/teact'; +import { memo, useCallback } from '../../../../lib/teact/teact'; import { getActions } from '../../../../global'; import type { ApiChatFolder } from '../../../../api/types'; diff --git a/src/components/left/settings/folders/SettingsFoldersChatFilters.tsx b/src/components/left/settings/folders/SettingsFoldersChatFilters.tsx index 6c2cc737e..7109db8c2 100644 --- a/src/components/left/settings/folders/SettingsFoldersChatFilters.tsx +++ b/src/components/left/settings/folders/SettingsFoldersChatFilters.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useState, } from '../../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../../global'; diff --git a/src/components/left/settings/folders/SettingsFoldersEdit.tsx b/src/components/left/settings/folders/SettingsFoldersEdit.tsx index fba6319cb..1817c4c0c 100644 --- a/src/components/left/settings/folders/SettingsFoldersEdit.tsx +++ b/src/components/left/settings/folders/SettingsFoldersEdit.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { +import type React from '../../../../lib/teact/teact'; +import { memo, useCallback, useEffect, useMemo, useState, } from '../../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../../global'; diff --git a/src/components/left/settings/folders/SettingsFoldersMain.tsx b/src/components/left/settings/folders/SettingsFoldersMain.tsx index c20925b57..efaabbb91 100644 --- a/src/components/left/settings/folders/SettingsFoldersMain.tsx +++ b/src/components/left/settings/folders/SettingsFoldersMain.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useState, } from '../../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../../global'; diff --git a/src/components/left/settings/folders/SettingsShareChatlist.tsx b/src/components/left/settings/folders/SettingsShareChatlist.tsx index ae90ea97f..e28b7f32a 100644 --- a/src/components/left/settings/folders/SettingsShareChatlist.tsx +++ b/src/components/left/settings/folders/SettingsShareChatlist.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, useState, } from '../../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../../global'; diff --git a/src/components/left/settings/passcode/SettingsPasscode.tsx b/src/components/left/settings/passcode/SettingsPasscode.tsx index 5fd359118..026813f16 100644 --- a/src/components/left/settings/passcode/SettingsPasscode.tsx +++ b/src/components/left/settings/passcode/SettingsPasscode.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo, useCallback } from '../../../../lib/teact/teact'; +import { memo, useCallback } from '../../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../../global'; import type { GlobalState } from '../../../../global/types'; diff --git a/src/components/left/settings/passcode/SettingsPasscodeCongratulations.tsx b/src/components/left/settings/passcode/SettingsPasscodeCongratulations.tsx index e333ec7b3..4c14bbf34 100644 --- a/src/components/left/settings/passcode/SettingsPasscodeCongratulations.tsx +++ b/src/components/left/settings/passcode/SettingsPasscodeCongratulations.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo, useCallback } from '../../../../lib/teact/teact'; +import { memo, useCallback } from '../../../../lib/teact/teact'; import { STICKER_SIZE_PASSCODE } from '../../../../config'; import { LOCAL_TGS_URLS } from '../../../common/helpers/animatedAssets'; diff --git a/src/components/left/settings/passcode/SettingsPasscodeEnabled.tsx b/src/components/left/settings/passcode/SettingsPasscodeEnabled.tsx index b511ab7ae..0a4c26957 100644 --- a/src/components/left/settings/passcode/SettingsPasscodeEnabled.tsx +++ b/src/components/left/settings/passcode/SettingsPasscodeEnabled.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo } from '../../../../lib/teact/teact'; +import { memo } from '../../../../lib/teact/teact'; import { getActions } from '../../../../global'; import { SettingsScreens } from '../../../../types'; diff --git a/src/components/left/settings/passcode/SettingsPasscodeStart.tsx b/src/components/left/settings/passcode/SettingsPasscodeStart.tsx index c64901623..c7e7ff43e 100644 --- a/src/components/left/settings/passcode/SettingsPasscodeStart.tsx +++ b/src/components/left/settings/passcode/SettingsPasscodeStart.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo } from '../../../../lib/teact/teact'; +import { memo } from '../../../../lib/teact/teact'; import { STICKER_SIZE_PASSCODE } from '../../../../config'; import { LOCAL_TGS_URLS } from '../../../common/helpers/animatedAssets'; diff --git a/src/components/left/settings/twoFa/SettingsTwoFa.tsx b/src/components/left/settings/twoFa/SettingsTwoFa.tsx index 8d47baf0d..65e71a609 100644 --- a/src/components/left/settings/twoFa/SettingsTwoFa.tsx +++ b/src/components/left/settings/twoFa/SettingsTwoFa.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo, useCallback, useEffect } from '../../../../lib/teact/teact'; +import { memo, useCallback, useEffect } from '../../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../../global'; import type { GlobalState } from '../../../../global/types'; diff --git a/src/components/left/settings/twoFa/SettingsTwoFaCongratulations.tsx b/src/components/left/settings/twoFa/SettingsTwoFaCongratulations.tsx index 60aca3aea..deb6b29af 100644 --- a/src/components/left/settings/twoFa/SettingsTwoFaCongratulations.tsx +++ b/src/components/left/settings/twoFa/SettingsTwoFaCongratulations.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo } from '../../../../lib/teact/teact'; +import { memo } from '../../../../lib/teact/teact'; import { getActions } from '../../../../global'; import { SettingsScreens } from '../../../../types'; diff --git a/src/components/left/settings/twoFa/SettingsTwoFaEmailCode.tsx b/src/components/left/settings/twoFa/SettingsTwoFaEmailCode.tsx index 992b05fa3..c9e787a12 100644 --- a/src/components/left/settings/twoFa/SettingsTwoFaEmailCode.tsx +++ b/src/components/left/settings/twoFa/SettingsTwoFaEmailCode.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { +import type React from '../../../../lib/teact/teact'; +import { memo, useCallback, useEffect, useRef, useState, } from '../../../../lib/teact/teact'; import { withGlobal } from '../../../../global'; diff --git a/src/components/left/settings/twoFa/SettingsTwoFaEnabled.tsx b/src/components/left/settings/twoFa/SettingsTwoFaEnabled.tsx index 87d419ba7..2d85a8a56 100644 --- a/src/components/left/settings/twoFa/SettingsTwoFaEnabled.tsx +++ b/src/components/left/settings/twoFa/SettingsTwoFaEnabled.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo } from '../../../../lib/teact/teact'; +import { memo } from '../../../../lib/teact/teact'; import { getActions } from '../../../../global'; import { SettingsScreens } from '../../../../types'; diff --git a/src/components/left/settings/twoFa/SettingsTwoFaSkippableForm.tsx b/src/components/left/settings/twoFa/SettingsTwoFaSkippableForm.tsx index da6e65065..495f06465 100644 --- a/src/components/left/settings/twoFa/SettingsTwoFaSkippableForm.tsx +++ b/src/components/left/settings/twoFa/SettingsTwoFaSkippableForm.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { +import type React from '../../../../lib/teact/teact'; +import { memo, useCallback, useEffect, useRef, useState, } from '../../../../lib/teact/teact'; import { withGlobal } from '../../../../global'; diff --git a/src/components/left/settings/twoFa/SettingsTwoFaStart.tsx b/src/components/left/settings/twoFa/SettingsTwoFaStart.tsx index f0e319b72..55798de96 100644 --- a/src/components/left/settings/twoFa/SettingsTwoFaStart.tsx +++ b/src/components/left/settings/twoFa/SettingsTwoFaStart.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo } from '../../../../lib/teact/teact'; +import { memo } from '../../../../lib/teact/teact'; import { LOCAL_TGS_URLS } from '../../../common/helpers/animatedAssets'; diff --git a/src/components/main/AppInactive.tsx b/src/components/main/AppInactive.tsx index 5f7eb2d7c..e15cdda41 100644 --- a/src/components/main/AppInactive.tsx +++ b/src/components/main/AppInactive.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { useCallback } from '../../lib/teact/teact'; +import { useCallback } from '../../lib/teact/teact'; import useHistoryBack from '../../hooks/useHistoryBack'; diff --git a/src/components/main/AttachBotRecipientPicker.async.tsx b/src/components/main/AttachBotRecipientPicker.async.tsx index 8bce988bf..88cc0a005 100644 --- a/src/components/main/AttachBotRecipientPicker.async.tsx +++ b/src/components/main/AttachBotRecipientPicker.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './AttachBotRecipientPicker'; diff --git a/src/components/main/AttachBotRecipientPicker.tsx b/src/components/main/AttachBotRecipientPicker.tsx index 34723aade..1f84d73b2 100644 --- a/src/components/main/AttachBotRecipientPicker.tsx +++ b/src/components/main/AttachBotRecipientPicker.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback, useEffect } from '../../lib/teact/teact'; +import { memo, useCallback, useEffect } from '../../lib/teact/teact'; import { getActions } from '../../global'; import type { TabState } from '../../global/types'; diff --git a/src/components/main/BotTrustModal.async.tsx b/src/components/main/BotTrustModal.async.tsx index e4cf349dc..c99aa8e39 100644 --- a/src/components/main/BotTrustModal.async.tsx +++ b/src/components/main/BotTrustModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './BotTrustModal'; diff --git a/src/components/main/BotTrustModal.tsx b/src/components/main/BotTrustModal.tsx index 6df4bd95c..6ea7b04e0 100644 --- a/src/components/main/BotTrustModal.tsx +++ b/src/components/main/BotTrustModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, useState, } from '../../lib/teact/teact'; import { getActions } from '../../global'; diff --git a/src/components/main/DeleteFolderDialog.async.tsx b/src/components/main/DeleteFolderDialog.async.tsx index ba2ca5797..da5e2b740 100644 --- a/src/components/main/DeleteFolderDialog.async.tsx +++ b/src/components/main/DeleteFolderDialog.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './DeleteFolderDialog'; diff --git a/src/components/main/DeleteFolderDialog.tsx b/src/components/main/DeleteFolderDialog.tsx index c5a21f7ec..d2d3ce4c1 100644 --- a/src/components/main/DeleteFolderDialog.tsx +++ b/src/components/main/DeleteFolderDialog.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback } from '../../lib/teact/teact'; +import { memo, useCallback } from '../../lib/teact/teact'; import { getActions } from '../../global'; import type { ApiChatFolder } from '../../api/types'; diff --git a/src/components/main/Dialogs.async.tsx b/src/components/main/Dialogs.async.tsx index 7d07d5620..204c6ed58 100644 --- a/src/components/main/Dialogs.async.tsx +++ b/src/components/main/Dialogs.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; diff --git a/src/components/main/Dialogs.tsx b/src/components/main/Dialogs.tsx index 78ecbe89a..7d0d0d6e6 100644 --- a/src/components/main/Dialogs.tsx +++ b/src/components/main/Dialogs.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useEffect } from '../../lib/teact/teact'; +import { memo, useEffect } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { diff --git a/src/components/main/DraftRecipientPicker.async.tsx b/src/components/main/DraftRecipientPicker.async.tsx index 6ba93e883..c32bd59c5 100644 --- a/src/components/main/DraftRecipientPicker.async.tsx +++ b/src/components/main/DraftRecipientPicker.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './DraftRecipientPicker'; diff --git a/src/components/main/DraftRecipientPicker.tsx b/src/components/main/DraftRecipientPicker.tsx index a4d2c1c91..80b30de8f 100644 --- a/src/components/main/DraftRecipientPicker.tsx +++ b/src/components/main/DraftRecipientPicker.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, } from '../../lib/teact/teact'; import { getActions } from '../../global'; diff --git a/src/components/main/ForwardRecipientPicker.async.tsx b/src/components/main/ForwardRecipientPicker.async.tsx index b04e59464..72a402844 100644 --- a/src/components/main/ForwardRecipientPicker.async.tsx +++ b/src/components/main/ForwardRecipientPicker.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './ForwardRecipientPicker'; diff --git a/src/components/main/ForwardRecipientPicker.tsx b/src/components/main/ForwardRecipientPicker.tsx index c519f74c0..8a3a14fdd 100644 --- a/src/components/main/ForwardRecipientPicker.tsx +++ b/src/components/main/ForwardRecipientPicker.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, } from '../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../global'; diff --git a/src/components/main/GameModal.tsx b/src/components/main/GameModal.tsx index 4be33bf9e..445c78b04 100644 --- a/src/components/main/GameModal.tsx +++ b/src/components/main/GameModal.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback, useEffect } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo, useCallback, useEffect } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { TabState } from '../../global/types'; diff --git a/src/components/main/HistoryCalendar.async.tsx b/src/components/main/HistoryCalendar.async.tsx index fec400026..2ffce73b3 100644 --- a/src/components/main/HistoryCalendar.async.tsx +++ b/src/components/main/HistoryCalendar.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './HistoryCalendar'; diff --git a/src/components/main/HistoryCalendar.tsx b/src/components/main/HistoryCalendar.tsx index 6ddc06fb4..b5bbbc075 100644 --- a/src/components/main/HistoryCalendar.tsx +++ b/src/components/main/HistoryCalendar.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback } from '../../lib/teact/teact'; +import { memo, useCallback } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import { selectTabState } from '../../global/selectors'; diff --git a/src/components/main/LockScreen.async.tsx b/src/components/main/LockScreen.async.tsx index 71d3e07c9..ec1a9dc45 100644 --- a/src/components/main/LockScreen.async.tsx +++ b/src/components/main/LockScreen.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './LockScreen'; diff --git a/src/components/main/LockScreen.tsx b/src/components/main/LockScreen.tsx index 8a1bc2fcc..7928cbaf1 100644 --- a/src/components/main/LockScreen.tsx +++ b/src/components/main/LockScreen.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useState, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/main/Main.async.tsx b/src/components/main/Main.async.tsx index 52c833501..803485435 100644 --- a/src/components/main/Main.async.tsx +++ b/src/components/main/Main.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './Main'; diff --git a/src/components/main/Main.tsx b/src/components/main/Main.tsx index beab24714..09297446c 100644 --- a/src/components/main/Main.tsx +++ b/src/components/main/Main.tsx @@ -1,6 +1,6 @@ import '../../global/actions/all'; -import React, { +import { beginHeavyAnimation, memo, useEffect, useLayoutEffect, useRef, useState, diff --git a/src/components/main/NewContactModal.async.tsx b/src/components/main/NewContactModal.async.tsx index d5af7543b..c5d6a69c5 100644 --- a/src/components/main/NewContactModal.async.tsx +++ b/src/components/main/NewContactModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './NewContactModal'; diff --git a/src/components/main/NewContactModal.tsx b/src/components/main/NewContactModal.tsx index 002ad6b61..aa9f89a07 100644 --- a/src/components/main/NewContactModal.tsx +++ b/src/components/main/NewContactModal.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useCallback, useEffect, useRef, useState, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/main/Notifications.async.tsx b/src/components/main/Notifications.async.tsx index 6a50382f0..2d4b71c3c 100644 --- a/src/components/main/Notifications.async.tsx +++ b/src/components/main/Notifications.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; diff --git a/src/components/main/Notifications.tsx b/src/components/main/Notifications.tsx index d781df924..ad083b669 100644 --- a/src/components/main/Notifications.tsx +++ b/src/components/main/Notifications.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import { withGlobal } from '../../global'; import type { ApiNotification } from '../../api/types'; diff --git a/src/components/main/PermissionCheckboxList.tsx b/src/components/main/PermissionCheckboxList.tsx index 0cceb452d..614a51e86 100644 --- a/src/components/main/PermissionCheckboxList.tsx +++ b/src/components/main/PermissionCheckboxList.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useMemo, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/main/SafeLinkModal.async.tsx b/src/components/main/SafeLinkModal.async.tsx index 6903e4fb6..05e7a698e 100644 --- a/src/components/main/SafeLinkModal.async.tsx +++ b/src/components/main/SafeLinkModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './SafeLinkModal'; diff --git a/src/components/main/SafeLinkModal.tsx b/src/components/main/SafeLinkModal.tsx index 0d6578fbb..690ca6cca 100644 --- a/src/components/main/SafeLinkModal.tsx +++ b/src/components/main/SafeLinkModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback } from '../../lib/teact/teact'; +import { memo, useCallback } from '../../lib/teact/teact'; import { getActions } from '../../global'; import { ensureProtocol } from '../../util/browser/url'; diff --git a/src/components/main/WebAppsCloseConfirmationModal.async.tsx b/src/components/main/WebAppsCloseConfirmationModal.async.tsx index 333308a6a..bc04067c1 100644 --- a/src/components/main/WebAppsCloseConfirmationModal.async.tsx +++ b/src/components/main/WebAppsCloseConfirmationModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; diff --git a/src/components/main/WebAppsCloseConfirmationModal.tsx b/src/components/main/WebAppsCloseConfirmationModal.tsx index 3c7de85d2..4d2182c37 100644 --- a/src/components/main/WebAppsCloseConfirmationModal.tsx +++ b/src/components/main/WebAppsCloseConfirmationModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useRef, useState, } from '../../lib/teact/teact'; import { getActions } from '../../global'; diff --git a/src/components/main/premium/GiveawayChannelPickerModal.tsx b/src/components/main/premium/GiveawayChannelPickerModal.tsx index 263c09b03..ec3e74dd8 100644 --- a/src/components/main/premium/GiveawayChannelPickerModal.tsx +++ b/src/components/main/premium/GiveawayChannelPickerModal.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useEffect, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, getGlobal } from '../../../global'; diff --git a/src/components/main/premium/GiveawayModal.async.tsx b/src/components/main/premium/GiveawayModal.async.tsx index 374daff0c..5edc71493 100644 --- a/src/components/main/premium/GiveawayModal.async.tsx +++ b/src/components/main/premium/GiveawayModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './GiveawayModal'; diff --git a/src/components/main/premium/GiveawayModal.tsx b/src/components/main/premium/GiveawayModal.tsx index 57f3e8970..425b05f2c 100644 --- a/src/components/main/premium/GiveawayModal.tsx +++ b/src/components/main/premium/GiveawayModal.tsx @@ -1,6 +1,7 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; diff --git a/src/components/main/premium/GiveawayTypeOption.tsx b/src/components/main/premium/GiveawayTypeOption.tsx index 1d75d15f2..970f28d9c 100644 --- a/src/components/main/premium/GiveawayTypeOption.tsx +++ b/src/components/main/premium/GiveawayTypeOption.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import buildClassName from '../../../util/buildClassName'; diff --git a/src/components/main/premium/GiveawayUserPickerModal.tsx b/src/components/main/premium/GiveawayUserPickerModal.tsx index 938c19d43..6e9eed5c8 100644 --- a/src/components/main/premium/GiveawayUserPickerModal.tsx +++ b/src/components/main/premium/GiveawayUserPickerModal.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useEffect, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; diff --git a/src/components/main/premium/PremiumFeatureItem.tsx b/src/components/main/premium/PremiumFeatureItem.tsx index 02ea23370..0115c321d 100644 --- a/src/components/main/premium/PremiumFeatureItem.tsx +++ b/src/components/main/premium/PremiumFeatureItem.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import type { IconName } from '../../../types/icons'; diff --git a/src/components/main/premium/PremiumFeatureModal.tsx b/src/components/main/premium/PremiumFeatureModal.tsx index c9773ddb2..48ae21e8c 100644 --- a/src/components/main/premium/PremiumFeatureModal.tsx +++ b/src/components/main/premium/PremiumFeatureModal.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { toggleExtraClass } from '../../../lib/teact/teact-dom'; diff --git a/src/components/main/premium/PremiumMainModal.async.tsx b/src/components/main/premium/PremiumMainModal.async.tsx index 8845dbcd5..38a6aab38 100644 --- a/src/components/main/premium/PremiumMainModal.async.tsx +++ b/src/components/main/premium/PremiumMainModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './PremiumMainModal'; diff --git a/src/components/main/premium/PremiumMainModal.tsx b/src/components/main/premium/PremiumMainModal.tsx index 9be2890c0..5021215bc 100644 --- a/src/components/main/premium/PremiumMainModal.tsx +++ b/src/components/main/premium/PremiumMainModal.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/main/premium/PremiumSubscriptionOption.tsx b/src/components/main/premium/PremiumSubscriptionOption.tsx index 9abdf5c4b..9589cccf4 100644 --- a/src/components/main/premium/PremiumSubscriptionOption.tsx +++ b/src/components/main/premium/PremiumSubscriptionOption.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useMemo } from '../../../lib/teact/teact'; +import { memo, useCallback, useMemo } from '../../../lib/teact/teact'; import type { ApiPremiumGiftCodeOption, ApiPremiumSubscriptionOption } from '../../../api/types'; diff --git a/src/components/main/premium/StarsGiftingPickerModal.async.tsx b/src/components/main/premium/StarsGiftingPickerModal.async.tsx index ed4e3d5f6..1f262d820 100644 --- a/src/components/main/premium/StarsGiftingPickerModal.async.tsx +++ b/src/components/main/premium/StarsGiftingPickerModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './StarsGiftingPickerModal'; diff --git a/src/components/main/premium/StarsGiftingPickerModal.tsx b/src/components/main/premium/StarsGiftingPickerModal.tsx index 852ceff6f..a8689c239 100644 --- a/src/components/main/premium/StarsGiftingPickerModal.tsx +++ b/src/components/main/premium/StarsGiftingPickerModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useMemo, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/main/premium/common/PremiumLimitPreview.tsx b/src/components/main/premium/common/PremiumLimitPreview.tsx index 67b4a21c4..2dc4dad82 100644 --- a/src/components/main/premium/common/PremiumLimitPreview.tsx +++ b/src/components/main/premium/common/PremiumLimitPreview.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../../lib/teact/teact'; +import { memo, useMemo } from '../../../../lib/teact/teact'; import { lerp } from '../../../../util/math'; diff --git a/src/components/main/premium/common/PremiumLimitReachedModal.async.tsx b/src/components/main/premium/common/PremiumLimitReachedModal.async.tsx index 135c50b43..f6b598376 100644 --- a/src/components/main/premium/common/PremiumLimitReachedModal.async.tsx +++ b/src/components/main/premium/common/PremiumLimitReachedModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../../lib/teact/teact'; -import React from '../../../../lib/teact/teact'; import type { OwnProps } from './PremiumLimitReachedModal'; diff --git a/src/components/main/premium/common/PremiumLimitReachedModal.tsx b/src/components/main/premium/common/PremiumLimitReachedModal.tsx index 20938bd01..5ba289f13 100644 --- a/src/components/main/premium/common/PremiumLimitReachedModal.tsx +++ b/src/components/main/premium/common/PremiumLimitReachedModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo, useCallback, useEffect } from '../../../../lib/teact/teact'; +import { memo, useCallback, useEffect } from '../../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../../global'; import type { ApiLimitTypeWithModal } from '../../../../api/types'; diff --git a/src/components/main/premium/common/PremiumLimitsCompare.tsx b/src/components/main/premium/common/PremiumLimitsCompare.tsx index 1f04cdd4d..c4c78cd19 100644 --- a/src/components/main/premium/common/PremiumLimitsCompare.tsx +++ b/src/components/main/premium/common/PremiumLimitsCompare.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo } from '../../../../lib/teact/teact'; +import { memo } from '../../../../lib/teact/teact'; import type { IconName } from '../../../../types/icons'; diff --git a/src/components/main/premium/previews/PremiumFeaturePreviewStickers.tsx b/src/components/main/premium/previews/PremiumFeaturePreviewStickers.tsx index 126c314c8..b2d07f800 100644 --- a/src/components/main/premium/previews/PremiumFeaturePreviewStickers.tsx +++ b/src/components/main/premium/previews/PremiumFeaturePreviewStickers.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useRef, useState, } from '../../../../lib/teact/teact'; import { withGlobal } from '../../../../global'; diff --git a/src/components/main/premium/previews/PremiumFeaturePreviewStories.tsx b/src/components/main/premium/previews/PremiumFeaturePreviewStories.tsx index 161577249..ccaf4eb66 100644 --- a/src/components/main/premium/previews/PremiumFeaturePreviewStories.tsx +++ b/src/components/main/premium/previews/PremiumFeaturePreviewStories.tsx @@ -1,4 +1,4 @@ -import React, { memo, useLayoutEffect, useRef } from '../../../../lib/teact/teact'; +import { memo, useLayoutEffect, useRef } from '../../../../lib/teact/teact'; import { withGlobal } from '../../../../global'; import type { ApiUser } from '../../../../api/types'; diff --git a/src/components/main/premium/previews/PremiumFeaturePreviewVideo.tsx b/src/components/main/premium/previews/PremiumFeaturePreviewVideo.tsx index 4c3bbeb0d..dd79d338d 100644 --- a/src/components/main/premium/previews/PremiumFeaturePreviewVideo.tsx +++ b/src/components/main/premium/previews/PremiumFeaturePreviewVideo.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo } from '../../../../lib/teact/teact'; +import { memo } from '../../../../lib/teact/teact'; import type { ApiThumbnail } from '../../../../api/types'; diff --git a/src/components/main/visualEffects/ConfettiContainer.tsx b/src/components/main/visualEffects/ConfettiContainer.tsx index 6596423ee..0e966df17 100644 --- a/src/components/main/visualEffects/ConfettiContainer.tsx +++ b/src/components/main/visualEffects/ConfettiContainer.tsx @@ -1,4 +1,4 @@ -import React, { memo, useRef } from '../../../lib/teact/teact'; +import { memo, useRef } from '../../../lib/teact/teact'; import { withGlobal } from '../../../global'; import type { TabState } from '../../../global/types'; diff --git a/src/components/main/visualEffects/SnapEffectContainer.tsx b/src/components/main/visualEffects/SnapEffectContainer.tsx index 4a811f611..50d3c5dde 100644 --- a/src/components/main/visualEffects/SnapEffectContainer.tsx +++ b/src/components/main/visualEffects/SnapEffectContainer.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getGlobal } from '../../../global'; import { SNAP_EFFECT_CONTAINER_ID, SNAP_EFFECT_ID, SVG_NAMESPACE } from '../../../config'; diff --git a/src/components/main/visualEffects/WaveContainer.tsx b/src/components/main/visualEffects/WaveContainer.tsx index d9d85a6f7..207103a5f 100644 --- a/src/components/main/visualEffects/WaveContainer.tsx +++ b/src/components/main/visualEffects/WaveContainer.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useEffect, useState, } from '../../../lib/teact/teact'; import { withGlobal } from '../../../global'; diff --git a/src/components/mediaViewer/MediaViewer.async.tsx b/src/components/mediaViewer/MediaViewer.async.tsx index 42ac3d98e..e1a74e7f1 100644 --- a/src/components/mediaViewer/MediaViewer.async.tsx +++ b/src/components/mediaViewer/MediaViewer.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; diff --git a/src/components/mediaViewer/MediaViewer.tsx b/src/components/mediaViewer/MediaViewer.tsx index 5426c43dc..96736b5aa 100644 --- a/src/components/mediaViewer/MediaViewer.tsx +++ b/src/components/mediaViewer/MediaViewer.tsx @@ -1,4 +1,5 @@ -import React, { +import type React from '../../lib/teact/teact'; +import { beginHeavyAnimation, memo, useEffect, useMemo, useRef, } from '../../lib/teact/teact'; diff --git a/src/components/mediaViewer/MediaViewerActions.tsx b/src/components/mediaViewer/MediaViewerActions.tsx index 7740d70d0..ff1f0fa1e 100644 --- a/src/components/mediaViewer/MediaViewerActions.tsx +++ b/src/components/mediaViewer/MediaViewerActions.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useMemo } from '../../lib/teact/teact'; +import { memo, useMemo } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { ApiChat } from '../../api/types'; diff --git a/src/components/mediaViewer/MediaViewerContent.tsx b/src/components/mediaViewer/MediaViewerContent.tsx index 561bfb5a4..7761a63c9 100644 --- a/src/components/mediaViewer/MediaViewerContent.tsx +++ b/src/components/mediaViewer/MediaViewerContent.tsx @@ -1,4 +1,5 @@ -import React, { memo } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { diff --git a/src/components/mediaViewer/MediaViewerFooter.tsx b/src/components/mediaViewer/MediaViewerFooter.tsx index 625d1ed68..5f0233ef2 100644 --- a/src/components/mediaViewer/MediaViewerFooter.tsx +++ b/src/components/mediaViewer/MediaViewerFooter.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { useEffect, useState } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { useEffect, useState } from '../../lib/teact/teact'; import type { TextPart } from '../../types'; diff --git a/src/components/mediaViewer/MediaViewerSlides.tsx b/src/components/mediaViewer/MediaViewerSlides.tsx index 6d5d64851..793cdd111 100644 --- a/src/components/mediaViewer/MediaViewerSlides.tsx +++ b/src/components/mediaViewer/MediaViewerSlides.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useLayoutEffect, useMemo, useRef, useSignal, useState, } from '../../lib/teact/teact'; diff --git a/src/components/mediaViewer/SeekLine.tsx b/src/components/mediaViewer/SeekLine.tsx index e045363a8..c3152e2a0 100644 --- a/src/components/mediaViewer/SeekLine.tsx +++ b/src/components/mediaViewer/SeekLine.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useEffect, useLayoutEffect, useMemo, useRef, useSignal, useState, } from '../../lib/teact/teact'; diff --git a/src/components/mediaViewer/SenderInfo.tsx b/src/components/mediaViewer/SenderInfo.tsx index 6068ba9a3..8ce2ccb6d 100644 --- a/src/components/mediaViewer/SenderInfo.tsx +++ b/src/components/mediaViewer/SenderInfo.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { useMemo } from '../../lib/teact/teact'; +import { useMemo } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { ApiChat, ApiPeer } from '../../api/types'; diff --git a/src/components/mediaViewer/VideoPlayer.tsx b/src/components/mediaViewer/VideoPlayer.tsx index c7e959a5a..2decd2f5b 100644 --- a/src/components/mediaViewer/VideoPlayer.tsx +++ b/src/components/mediaViewer/VideoPlayer.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useRef, useState, } from '../../lib/teact/teact'; import { getActions } from '../../global'; diff --git a/src/components/mediaViewer/VideoPlayerControls.tsx b/src/components/mediaViewer/VideoPlayerControls.tsx index 66f8eda76..a854f727c 100644 --- a/src/components/mediaViewer/VideoPlayerControls.tsx +++ b/src/components/mediaViewer/VideoPlayerControls.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useLayoutEffect, useMemo, useRef, diff --git a/src/components/middle/ChatLanguageModal.async.tsx b/src/components/middle/ChatLanguageModal.async.tsx index 1b5a52bde..558f9fd43 100644 --- a/src/components/middle/ChatLanguageModal.async.tsx +++ b/src/components/middle/ChatLanguageModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './ChatLanguageModal'; diff --git a/src/components/middle/ChatLanguageModal.tsx b/src/components/middle/ChatLanguageModal.tsx index efe33cc5d..b2267629a 100644 --- a/src/components/middle/ChatLanguageModal.tsx +++ b/src/components/middle/ChatLanguageModal.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useMemo, useState, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/middle/ContactGreeting.tsx b/src/components/middle/ContactGreeting.tsx index 20246e7b0..2da7ea723 100644 --- a/src/components/middle/ContactGreeting.tsx +++ b/src/components/middle/ContactGreeting.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/middle/EmojiInteractionAnimation.async.tsx b/src/components/middle/EmojiInteractionAnimation.async.tsx index 827461f38..d8a7fb871 100644 --- a/src/components/middle/EmojiInteractionAnimation.async.tsx +++ b/src/components/middle/EmojiInteractionAnimation.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './EmojiInteractionAnimation'; diff --git a/src/components/middle/EmojiInteractionAnimation.tsx b/src/components/middle/EmojiInteractionAnimation.tsx index 047f65690..15afbf68d 100644 --- a/src/components/middle/EmojiInteractionAnimation.tsx +++ b/src/components/middle/EmojiInteractionAnimation.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { beginHeavyAnimation, memo, useEffect, useLayoutEffect, useRef, } from '../../lib/teact/teact'; diff --git a/src/components/middle/FloatingActionButtons.tsx b/src/components/middle/FloatingActionButtons.tsx index 5952e687e..00276abd3 100644 --- a/src/components/middle/FloatingActionButtons.tsx +++ b/src/components/middle/FloatingActionButtons.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useEffect, useRef } from '../../lib/teact/teact'; +import { memo, useEffect, useRef } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { MessageListType, ThreadId } from '../../types'; diff --git a/src/components/middle/FrozenAccountPlaceholder.tsx b/src/components/middle/FrozenAccountPlaceholder.tsx index 7249ab4ba..bc1eda890 100644 --- a/src/components/middle/FrozenAccountPlaceholder.tsx +++ b/src/components/middle/FrozenAccountPlaceholder.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import { getActions } from '../../global'; import useLang from '../../hooks/useLang'; diff --git a/src/components/middle/HeaderActions.tsx b/src/components/middle/HeaderActions.tsx index 5d961390d..9d80442e9 100644 --- a/src/components/middle/HeaderActions.tsx +++ b/src/components/middle/HeaderActions.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useMemo, useRef, useState, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/middle/HeaderMenuContainer.async.tsx b/src/components/middle/HeaderMenuContainer.async.tsx index 6d244fe13..06001b9e9 100644 --- a/src/components/middle/HeaderMenuContainer.async.tsx +++ b/src/components/middle/HeaderMenuContainer.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './HeaderMenuContainer'; diff --git a/src/components/middle/HeaderMenuContainer.tsx b/src/components/middle/HeaderMenuContainer.tsx index a77c692b4..d0a66c574 100644 --- a/src/components/middle/HeaderMenuContainer.tsx +++ b/src/components/middle/HeaderMenuContainer.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useState, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/middle/MessageList.tsx b/src/components/middle/MessageList.tsx index 2f4420fb2..7489dc4da 100644 --- a/src/components/middle/MessageList.tsx +++ b/src/components/middle/MessageList.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { beginHeavyAnimation, memo, useEffect, useMemo, useRef, } from '../../lib/teact/teact'; import { addExtraClass, removeExtraClass } from '../../lib/teact/teact-dom'; diff --git a/src/components/middle/MessageListAccountInfo.tsx b/src/components/middle/MessageListAccountInfo.tsx index 7c43846da..c211e2200 100644 --- a/src/components/middle/MessageListAccountInfo.tsx +++ b/src/components/middle/MessageListAccountInfo.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useMemo, diff --git a/src/components/middle/MessageListContent.tsx b/src/components/middle/MessageListContent.tsx index 2f1b67a05..186136c3d 100644 --- a/src/components/middle/MessageListContent.tsx +++ b/src/components/middle/MessageListContent.tsx @@ -1,5 +1,5 @@ import type { ElementRef, FC } from '../../lib/teact/teact'; -import React, { getIsHeavyAnimating, memo } from '../../lib/teact/teact'; +import { getIsHeavyAnimating, memo } from '../../lib/teact/teact'; import { getActions, getGlobal } from '../../global'; import type { ApiMessage } from '../../api/types'; diff --git a/src/components/middle/MessageListHistoryHandler.tsx b/src/components/middle/MessageListHistoryHandler.tsx index 80581238a..a8a5b02ec 100644 --- a/src/components/middle/MessageListHistoryHandler.tsx +++ b/src/components/middle/MessageListHistoryHandler.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { MessageList as GlobalMessageList } from '../../types'; diff --git a/src/components/middle/MessageSelectToolbar.async.tsx b/src/components/middle/MessageSelectToolbar.async.tsx index 5d962daa2..754348936 100644 --- a/src/components/middle/MessageSelectToolbar.async.tsx +++ b/src/components/middle/MessageSelectToolbar.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './MessageSelectToolbar'; diff --git a/src/components/middle/MessageSelectToolbar.tsx b/src/components/middle/MessageSelectToolbar.tsx index 02cd84f6c..d74bf89ac 100644 --- a/src/components/middle/MessageSelectToolbar.tsx +++ b/src/components/middle/MessageSelectToolbar.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useEffect, useState } from '../../lib/teact/teact'; +import { memo, useEffect, useState } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { ApiChat } from '../../api/types'; diff --git a/src/components/middle/MiddleColumn.tsx b/src/components/middle/MiddleColumn.tsx index 24da98cb6..d57b11030 100644 --- a/src/components/middle/MiddleColumn.tsx +++ b/src/components/middle/MiddleColumn.tsx @@ -1,6 +1,7 @@ import type { ElementRef } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useMemo, useState, } from '../../lib/teact/teact'; diff --git a/src/components/middle/MiddleHeader.tsx b/src/components/middle/MiddleHeader.tsx index df2d6d927..f7ebc0539 100644 --- a/src/components/middle/MiddleHeader.tsx +++ b/src/components/middle/MiddleHeader.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useRef, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/middle/MiddleHeaderPanes.tsx b/src/components/middle/MiddleHeaderPanes.tsx index 52e897e89..238fef893 100644 --- a/src/components/middle/MiddleHeaderPanes.tsx +++ b/src/components/middle/MiddleHeaderPanes.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useRef, useSignal, } from '../../lib/teact/teact'; import { setExtraStyles } from '../../lib/teact/teact-dom'; diff --git a/src/components/middle/NoMessages.tsx b/src/components/middle/NoMessages.tsx index ef93eb8bc..a43ff1e40 100644 --- a/src/components/middle/NoMessages.tsx +++ b/src/components/middle/NoMessages.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import type { ApiTopic } from '../../api/types'; import type { OldLangFn } from '../../hooks/useOldLang'; diff --git a/src/components/middle/PinnedMessageNavigation.tsx b/src/components/middle/PinnedMessageNavigation.tsx index a925b07c2..5bf4ba62a 100644 --- a/src/components/middle/PinnedMessageNavigation.tsx +++ b/src/components/middle/PinnedMessageNavigation.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useLayoutEffect, useMemo, diff --git a/src/components/middle/PremiumRequiredPlaceholder.tsx b/src/components/middle/PremiumRequiredPlaceholder.tsx index b840cbd5c..c399e7ef5 100644 --- a/src/components/middle/PremiumRequiredPlaceholder.tsx +++ b/src/components/middle/PremiumRequiredPlaceholder.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import { getUserFirstOrLastName } from '../../global/helpers'; diff --git a/src/components/middle/ReactorListModal.async.tsx b/src/components/middle/ReactorListModal.async.tsx index 26050086a..f2faedd71 100644 --- a/src/components/middle/ReactorListModal.async.tsx +++ b/src/components/middle/ReactorListModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './ReactorListModal'; diff --git a/src/components/middle/ReactorListModal.tsx b/src/components/middle/ReactorListModal.tsx index b17bdfb02..6738eb039 100644 --- a/src/components/middle/ReactorListModal.tsx +++ b/src/components/middle/ReactorListModal.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useMemo, useRef, useState, } from '../../lib/teact/teact'; diff --git a/src/components/middle/RequirementToContactMessage.tsx b/src/components/middle/RequirementToContactMessage.tsx index 85c90cf1e..391a8a780 100644 --- a/src/components/middle/RequirementToContactMessage.tsx +++ b/src/components/middle/RequirementToContactMessage.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import { getUserFirstOrLastName } from '../../global/helpers'; diff --git a/src/components/middle/ScrollDownButton.tsx b/src/components/middle/ScrollDownButton.tsx index a54da0fbb..f5e356a87 100644 --- a/src/components/middle/ScrollDownButton.tsx +++ b/src/components/middle/ScrollDownButton.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useRef } from '../../lib/teact/teact'; +import { memo, useRef } from '../../lib/teact/teact'; import type { IconName } from '../../types/icons'; diff --git a/src/components/middle/composer/AttachBotIcon.tsx b/src/components/middle/composer/AttachBotIcon.tsx index 53139970b..76844f9df 100644 --- a/src/components/middle/composer/AttachBotIcon.tsx +++ b/src/components/middle/composer/AttachBotIcon.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import type { ApiDocument } from '../../../api/types'; import type { ThemeKey } from '../../../types'; diff --git a/src/components/middle/composer/AttachBotItem.tsx b/src/components/middle/composer/AttachBotItem.tsx index aaa2ac74e..a73c2f7a7 100644 --- a/src/components/middle/composer/AttachBotItem.tsx +++ b/src/components/middle/composer/AttachBotItem.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; diff --git a/src/components/middle/composer/AttachMenu.tsx b/src/components/middle/composer/AttachMenu.tsx index 2a9e43508..f13b269ee 100644 --- a/src/components/middle/composer/AttachMenu.tsx +++ b/src/components/middle/composer/AttachMenu.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, } from '../../../lib/teact/teact'; diff --git a/src/components/middle/composer/AttachmentModal.async.tsx b/src/components/middle/composer/AttachmentModal.async.tsx index d991bddde..cfc32cd67 100644 --- a/src/components/middle/composer/AttachmentModal.async.tsx +++ b/src/components/middle/composer/AttachmentModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './AttachmentModal'; diff --git a/src/components/middle/composer/AttachmentModal.tsx b/src/components/middle/composer/AttachmentModal.tsx index 8ee5600fc..ca86e3b23 100644 --- a/src/components/middle/composer/AttachmentModal.tsx +++ b/src/components/middle/composer/AttachmentModal.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/middle/composer/AttachmentModalItem.tsx b/src/components/middle/composer/AttachmentModalItem.tsx index 3bbc92d9e..e9f18b1e4 100644 --- a/src/components/middle/composer/AttachmentModalItem.tsx +++ b/src/components/middle/composer/AttachmentModalItem.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import type { ApiAttachment } from '../../../api/types'; diff --git a/src/components/middle/composer/BotCommandMenu.async.tsx b/src/components/middle/composer/BotCommandMenu.async.tsx index fe816afd0..145d411c3 100644 --- a/src/components/middle/composer/BotCommandMenu.async.tsx +++ b/src/components/middle/composer/BotCommandMenu.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './BotCommandMenu'; diff --git a/src/components/middle/composer/BotCommandMenu.tsx b/src/components/middle/composer/BotCommandMenu.tsx index 89e42d186..b89074419 100644 --- a/src/components/middle/composer/BotCommandMenu.tsx +++ b/src/components/middle/composer/BotCommandMenu.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiBotCommand } from '../../../api/types'; diff --git a/src/components/middle/composer/BotKeyboardMenu.tsx b/src/components/middle/composer/BotKeyboardMenu.tsx index d99dc9523..786469f21 100644 --- a/src/components/middle/composer/BotKeyboardMenu.tsx +++ b/src/components/middle/composer/BotKeyboardMenu.tsx @@ -1,5 +1,5 @@ import type { FC, TeactNode } from '../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiMessage } from '../../../api/types'; diff --git a/src/components/middle/composer/BotMenuButton.tsx b/src/components/middle/composer/BotMenuButton.tsx index 46ba8f33c..062b6341f 100644 --- a/src/components/middle/composer/BotMenuButton.tsx +++ b/src/components/middle/composer/BotMenuButton.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useEffect, useRef } from '../../../lib/teact/teact'; +import { memo, useEffect, useRef } from '../../../lib/teact/teact'; import buildClassName from '../../../util/buildClassName'; import renderText from '../../common/helpers/renderText'; diff --git a/src/components/middle/composer/ChatCommand.tsx b/src/components/middle/composer/ChatCommand.tsx index 97e6f3470..c066b690f 100644 --- a/src/components/middle/composer/ChatCommand.tsx +++ b/src/components/middle/composer/ChatCommand.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import type { ApiUser } from '../../../api/types'; diff --git a/src/components/middle/composer/ChatCommandTooltip.async.tsx b/src/components/middle/composer/ChatCommandTooltip.async.tsx index a908b8da8..732fe1f89 100644 --- a/src/components/middle/composer/ChatCommandTooltip.async.tsx +++ b/src/components/middle/composer/ChatCommandTooltip.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './ChatCommandTooltip'; diff --git a/src/components/middle/composer/ChatCommandTooltip.tsx b/src/components/middle/composer/ChatCommandTooltip.tsx index 6b34dd06c..9bf279263 100644 --- a/src/components/middle/composer/ChatCommandTooltip.tsx +++ b/src/components/middle/composer/ChatCommandTooltip.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, } from '../../../lib/teact/teact'; import { getActions, getGlobal } from '../../../global'; diff --git a/src/components/middle/composer/ComposerEmbeddedMessage.tsx b/src/components/middle/composer/ComposerEmbeddedMessage.tsx index 1db3a88ea..2eaa9e981 100644 --- a/src/components/middle/composer/ComposerEmbeddedMessage.tsx +++ b/src/components/middle/composer/ComposerEmbeddedMessage.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useMemo, useRef, } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; diff --git a/src/components/middle/composer/CustomEmojiButton.tsx b/src/components/middle/composer/CustomEmojiButton.tsx index 38e736570..fef026bd4 100644 --- a/src/components/middle/composer/CustomEmojiButton.tsx +++ b/src/components/middle/composer/CustomEmojiButton.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import type { ApiSticker } from '../../../api/types'; import type { ObserveFn } from '../../../hooks/useIntersectionObserver'; diff --git a/src/components/middle/composer/CustomEmojiTooltip.async.tsx b/src/components/middle/composer/CustomEmojiTooltip.async.tsx index c8c6c845c..36dbcca06 100644 --- a/src/components/middle/composer/CustomEmojiTooltip.async.tsx +++ b/src/components/middle/composer/CustomEmojiTooltip.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './CustomEmojiTooltip'; diff --git a/src/components/middle/composer/CustomEmojiTooltip.tsx b/src/components/middle/composer/CustomEmojiTooltip.tsx index 74f6d82c7..04794108e 100644 --- a/src/components/middle/composer/CustomEmojiTooltip.tsx +++ b/src/components/middle/composer/CustomEmojiTooltip.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useEffect, useRef } from '../../../lib/teact/teact'; +import { memo, useEffect, useRef } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiSticker } from '../../../api/types'; diff --git a/src/components/middle/composer/CustomSendMenu.async.tsx b/src/components/middle/composer/CustomSendMenu.async.tsx index 002838efe..a6a3f8dfb 100644 --- a/src/components/middle/composer/CustomSendMenu.async.tsx +++ b/src/components/middle/composer/CustomSendMenu.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './CustomSendMenu'; diff --git a/src/components/middle/composer/CustomSendMenu.tsx b/src/components/middle/composer/CustomSendMenu.tsx index 7962840c3..ebfad3ac2 100644 --- a/src/components/middle/composer/CustomSendMenu.tsx +++ b/src/components/middle/composer/CustomSendMenu.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useState, } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; diff --git a/src/components/middle/composer/DropArea.async.tsx b/src/components/middle/composer/DropArea.async.tsx index 7834f1e76..30e67af29 100644 --- a/src/components/middle/composer/DropArea.async.tsx +++ b/src/components/middle/composer/DropArea.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './DropArea'; diff --git a/src/components/middle/composer/DropArea.tsx b/src/components/middle/composer/DropArea.tsx index 8aa9164f1..fb17f3c39 100644 --- a/src/components/middle/composer/DropArea.tsx +++ b/src/components/middle/composer/DropArea.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useEffect, useRef } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useRef } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiMessage } from '../../../api/types'; diff --git a/src/components/middle/composer/DropTarget.tsx b/src/components/middle/composer/DropTarget.tsx index f1009bc8a..f5cf579fa 100644 --- a/src/components/middle/composer/DropTarget.tsx +++ b/src/components/middle/composer/DropTarget.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useRef } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo, useRef } from '../../../lib/teact/teact'; import buildClassName from '../../../util/buildClassName'; diff --git a/src/components/middle/composer/EmojiButton.tsx b/src/components/middle/composer/EmojiButton.tsx index d0a45c8d1..f5bfa06cb 100644 --- a/src/components/middle/composer/EmojiButton.tsx +++ b/src/components/middle/composer/EmojiButton.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { BASE_URL, IS_PACKAGED_ELECTRON } from '../../../config'; import { IS_EMOJI_SUPPORTED } from '../../../util/browser/windowEnvironment'; diff --git a/src/components/middle/composer/EmojiCategory.tsx b/src/components/middle/composer/EmojiCategory.tsx index 754b2ab23..03829cc44 100644 --- a/src/components/middle/composer/EmojiCategory.tsx +++ b/src/components/middle/composer/EmojiCategory.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useRef } from '../../../lib/teact/teact'; +import { memo, useRef } from '../../../lib/teact/teact'; import type { ObserveFn } from '../../../hooks/useIntersectionObserver'; diff --git a/src/components/middle/composer/EmojiPicker.tsx b/src/components/middle/composer/EmojiPicker.tsx index 3b58691a2..ddbab2230 100644 --- a/src/components/middle/composer/EmojiPicker.tsx +++ b/src/components/middle/composer/EmojiPicker.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/middle/composer/EmojiTooltip.async.tsx b/src/components/middle/composer/EmojiTooltip.async.tsx index 7131b0fed..d726eec42 100644 --- a/src/components/middle/composer/EmojiTooltip.async.tsx +++ b/src/components/middle/composer/EmojiTooltip.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './EmojiTooltip'; diff --git a/src/components/middle/composer/EmojiTooltip.tsx b/src/components/middle/composer/EmojiTooltip.tsx index bd6b59407..dbf38ea12 100644 --- a/src/components/middle/composer/EmojiTooltip.tsx +++ b/src/components/middle/composer/EmojiTooltip.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useRef } from '../../../lib/teact/teact'; +import { memo, useRef } from '../../../lib/teact/teact'; import type { ApiSticker } from '../../../api/types'; diff --git a/src/components/middle/composer/GifPicker.tsx b/src/components/middle/composer/GifPicker.tsx index 17d0e9d2b..b0a73a6e6 100644 --- a/src/components/middle/composer/GifPicker.tsx +++ b/src/components/middle/composer/GifPicker.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useRef, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/middle/composer/InlineBotTooltip.async.tsx b/src/components/middle/composer/InlineBotTooltip.async.tsx index 7812b082c..f9128b0d0 100644 --- a/src/components/middle/composer/InlineBotTooltip.async.tsx +++ b/src/components/middle/composer/InlineBotTooltip.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './InlineBotTooltip'; diff --git a/src/components/middle/composer/InlineBotTooltip.tsx b/src/components/middle/composer/InlineBotTooltip.tsx index e3713576a..d655d375b 100644 --- a/src/components/middle/composer/InlineBotTooltip.tsx +++ b/src/components/middle/composer/InlineBotTooltip.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useEffect, useRef } from '../../../lib/teact/teact'; +import { memo, useEffect, useRef } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { diff --git a/src/components/middle/composer/MentionTooltip.async.tsx b/src/components/middle/composer/MentionTooltip.async.tsx index 739f44f33..0c1f27922 100644 --- a/src/components/middle/composer/MentionTooltip.async.tsx +++ b/src/components/middle/composer/MentionTooltip.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './MentionTooltip'; diff --git a/src/components/middle/composer/MentionTooltip.tsx b/src/components/middle/composer/MentionTooltip.tsx index 1be59bae2..6cc4869dd 100644 --- a/src/components/middle/composer/MentionTooltip.tsx +++ b/src/components/middle/composer/MentionTooltip.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useEffect, useRef } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useRef } from '../../../lib/teact/teact'; import { getGlobal } from '../../../global'; import type { ApiUser } from '../../../api/types'; diff --git a/src/components/middle/composer/MessageInput.tsx b/src/components/middle/composer/MessageInput.tsx index ed8933809..1010274be 100644 --- a/src/components/middle/composer/MessageInput.tsx +++ b/src/components/middle/composer/MessageInput.tsx @@ -1,6 +1,7 @@ import type { ChangeEvent } from 'react'; import type { ElementRef, FC, TeactNode } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { getIsHeavyAnimating, memo, useEffect, useLayoutEffect, useRef, useState, diff --git a/src/components/middle/composer/PollModal.async.tsx b/src/components/middle/composer/PollModal.async.tsx index cd41e6865..9a56bb779 100644 --- a/src/components/middle/composer/PollModal.async.tsx +++ b/src/components/middle/composer/PollModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './PollModal'; diff --git a/src/components/middle/composer/PollModal.tsx b/src/components/middle/composer/PollModal.tsx index c4ed8c968..1110d6c7f 100644 --- a/src/components/middle/composer/PollModal.tsx +++ b/src/components/middle/composer/PollModal.tsx @@ -1,6 +1,7 @@ import type { ChangeEvent } from 'react'; import type { ElementRef, FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useRef, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/middle/composer/SendAsMenu.async.tsx b/src/components/middle/composer/SendAsMenu.async.tsx index 9ef3b94e2..1e0c7db18 100644 --- a/src/components/middle/composer/SendAsMenu.async.tsx +++ b/src/components/middle/composer/SendAsMenu.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './SendAsMenu'; diff --git a/src/components/middle/composer/SendAsMenu.tsx b/src/components/middle/composer/SendAsMenu.tsx index 4fa971340..86026102c 100644 --- a/src/components/middle/composer/SendAsMenu.tsx +++ b/src/components/middle/composer/SendAsMenu.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useEffect, useRef } from '../../../lib/teact/teact'; +import { memo, useEffect, useRef } from '../../../lib/teact/teact'; import { getActions, getGlobal } from '../../../global'; import type { ApiSendAsPeerId } from '../../../api/types'; diff --git a/src/components/middle/composer/StickerPicker.tsx b/src/components/middle/composer/StickerPicker.tsx index ea94177fb..c9c14ea05 100644 --- a/src/components/middle/composer/StickerPicker.tsx +++ b/src/components/middle/composer/StickerPicker.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, } from '../../../lib/teact/teact'; diff --git a/src/components/middle/composer/StickerSetCover.tsx b/src/components/middle/composer/StickerSetCover.tsx index fbc210a4f..f88c8a5f7 100644 --- a/src/components/middle/composer/StickerSetCover.tsx +++ b/src/components/middle/composer/StickerSetCover.tsx @@ -1,5 +1,5 @@ import type { ElementRef, FC } from '../../../lib/teact/teact'; -import React, { memo, useEffect, useRef } from '../../../lib/teact/teact'; +import { memo, useEffect, useRef } from '../../../lib/teact/teact'; import { getActions, getGlobal } from '../../../global'; import type { ApiStickerSet } from '../../../api/types'; diff --git a/src/components/middle/composer/StickerTooltip.async.tsx b/src/components/middle/composer/StickerTooltip.async.tsx index 782711fe4..f132b8bf6 100644 --- a/src/components/middle/composer/StickerTooltip.async.tsx +++ b/src/components/middle/composer/StickerTooltip.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './StickerTooltip'; diff --git a/src/components/middle/composer/StickerTooltip.tsx b/src/components/middle/composer/StickerTooltip.tsx index 9cd144b56..ef77f94ea 100644 --- a/src/components/middle/composer/StickerTooltip.tsx +++ b/src/components/middle/composer/StickerTooltip.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useEffect, useRef } from '../../../lib/teact/teact'; +import { memo, useEffect, useRef } from '../../../lib/teact/teact'; import { withGlobal } from '../../../global'; import type { ApiSticker } from '../../../api/types'; diff --git a/src/components/middle/composer/SymbolMenu.async.tsx b/src/components/middle/composer/SymbolMenu.async.tsx index 1107b2d2e..3058b642c 100644 --- a/src/components/middle/composer/SymbolMenu.async.tsx +++ b/src/components/middle/composer/SymbolMenu.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './SymbolMenu'; diff --git a/src/components/middle/composer/SymbolMenu.tsx b/src/components/middle/composer/SymbolMenu.tsx index af39f53c6..32d60e21b 100644 --- a/src/components/middle/composer/SymbolMenu.tsx +++ b/src/components/middle/composer/SymbolMenu.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useLayoutEffect, useRef, useState, } from '../../../lib/teact/teact'; import { withGlobal } from '../../../global'; diff --git a/src/components/middle/composer/SymbolMenuButton.tsx b/src/components/middle/composer/SymbolMenuButton.tsx index b93e88a0f..3a2c27d2b 100644 --- a/src/components/middle/composer/SymbolMenuButton.tsx +++ b/src/components/middle/composer/SymbolMenuButton.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useRef, useState } from '../../../lib/teact/teact'; +import { memo, useRef, useState } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiSticker, ApiVideo } from '../../../api/types'; diff --git a/src/components/middle/composer/SymbolMenuFooter.tsx b/src/components/middle/composer/SymbolMenuFooter.tsx index 9376d16bb..f1e7fa808 100644 --- a/src/components/middle/composer/SymbolMenuFooter.tsx +++ b/src/components/middle/composer/SymbolMenuFooter.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import buildClassName from '../../../util/buildClassName'; diff --git a/src/components/middle/composer/TextFormatter.async.tsx b/src/components/middle/composer/TextFormatter.async.tsx index 70d1def53..ca48755f3 100644 --- a/src/components/middle/composer/TextFormatter.async.tsx +++ b/src/components/middle/composer/TextFormatter.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './TextFormatter'; diff --git a/src/components/middle/composer/TextFormatter.tsx b/src/components/middle/composer/TextFormatter.tsx index 9a03245ac..f7039f68d 100644 --- a/src/components/middle/composer/TextFormatter.tsx +++ b/src/components/middle/composer/TextFormatter.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useRef, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/middle/composer/WebPagePreview.tsx b/src/components/middle/composer/WebPagePreview.tsx index 3604dae36..9c819c8f8 100644 --- a/src/components/middle/composer/WebPagePreview.tsx +++ b/src/components/middle/composer/WebPagePreview.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useEffect, useRef } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useRef } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { diff --git a/src/components/middle/composer/helpers/renderKeyboardButtonText.tsx b/src/components/middle/composer/helpers/renderKeyboardButtonText.tsx index 88d3b707f..f950f454a 100644 --- a/src/components/middle/composer/helpers/renderKeyboardButtonText.tsx +++ b/src/components/middle/composer/helpers/renderKeyboardButtonText.tsx @@ -1,4 +1,4 @@ -import React, { type TeactNode } from '../../../../lib/teact/teact'; +import { type TeactNode } from '../../../../lib/teact/teact'; import type { ApiKeyboardButton } from '../../../../api/types'; import type { LangFn } from '../../../../util/localization'; diff --git a/src/components/middle/composer/inlineResults/ArticleResult.tsx b/src/components/middle/composer/inlineResults/ArticleResult.tsx index 3580628eb..f94acd296 100644 --- a/src/components/middle/composer/inlineResults/ArticleResult.tsx +++ b/src/components/middle/composer/inlineResults/ArticleResult.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo } from '../../../../lib/teact/teact'; +import { memo } from '../../../../lib/teact/teact'; import type { ApiBotInlineMediaResult, ApiBotInlineResult } from '../../../../api/types'; diff --git a/src/components/middle/composer/inlineResults/BaseResult.tsx b/src/components/middle/composer/inlineResults/BaseResult.tsx index 38032e968..a12b64271 100644 --- a/src/components/middle/composer/inlineResults/BaseResult.tsx +++ b/src/components/middle/composer/inlineResults/BaseResult.tsx @@ -1,5 +1,5 @@ import type { FC, TeactNode } from '../../../../lib/teact/teact'; -import React, { memo } from '../../../../lib/teact/teact'; +import { memo } from '../../../../lib/teact/teact'; import type { ApiWebDocument } from '../../../../api/types'; diff --git a/src/components/middle/composer/inlineResults/GifResult.tsx b/src/components/middle/composer/inlineResults/GifResult.tsx index ebc2dd796..5dfbc9e2f 100644 --- a/src/components/middle/composer/inlineResults/GifResult.tsx +++ b/src/components/middle/composer/inlineResults/GifResult.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo } from '../../../../lib/teact/teact'; +import { memo } from '../../../../lib/teact/teact'; import type { ApiBotInlineMediaResult, ApiVideo } from '../../../../api/types'; import type { ObserveFn } from '../../../../hooks/useIntersectionObserver'; diff --git a/src/components/middle/composer/inlineResults/MediaResult.tsx b/src/components/middle/composer/inlineResults/MediaResult.tsx index cce8793e7..85cb19b93 100644 --- a/src/components/middle/composer/inlineResults/MediaResult.tsx +++ b/src/components/middle/composer/inlineResults/MediaResult.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo } from '../../../../lib/teact/teact'; +import { memo } from '../../../../lib/teact/teact'; import type { ApiBotInlineMediaResult, ApiBotInlineResult, ApiPhoto, ApiThumbnail, ApiWebDocument, diff --git a/src/components/middle/composer/inlineResults/StickerResult.tsx b/src/components/middle/composer/inlineResults/StickerResult.tsx index dfcd9f34a..03b7e3aa2 100644 --- a/src/components/middle/composer/inlineResults/StickerResult.tsx +++ b/src/components/middle/composer/inlineResults/StickerResult.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo } from '../../../../lib/teact/teact'; +import { memo } from '../../../../lib/teact/teact'; import type { ApiBotInlineMediaResult } from '../../../../api/types'; import type { ObserveFn } from '../../../../hooks/useIntersectionObserver'; diff --git a/src/components/middle/message/ActionMessage.tsx b/src/components/middle/message/ActionMessage.tsx index 6f20ba1d1..98afbb06a 100644 --- a/src/components/middle/message/ActionMessage.tsx +++ b/src/components/middle/message/ActionMessage.tsx @@ -1,4 +1,5 @@ -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useMemo, useRef, useUnmountCleanup, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/middle/message/ActionMessageText.tsx b/src/components/middle/message/ActionMessageText.tsx index dec16a76f..080228ddc 100644 --- a/src/components/middle/message/ActionMessageText.tsx +++ b/src/components/middle/message/ActionMessageText.tsx @@ -1,4 +1,4 @@ -import React, { memo, type TeactNode } from '../../../lib/teact/teact'; +import { memo, type TeactNode } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; import type { ApiChat, ApiMessage, ApiPeer } from '../../../api/types'; diff --git a/src/components/middle/message/Album.tsx b/src/components/middle/message/Album.tsx index 0d92ba3a6..24f40ba3d 100644 --- a/src/components/middle/message/Album.tsx +++ b/src/components/middle/message/Album.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { useMemo } from '../../../lib/teact/teact'; +import { useMemo } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; import type { ApiMessage } from '../../../api/types'; diff --git a/src/components/middle/message/AnimatedCustomEmoji.tsx b/src/components/middle/message/AnimatedCustomEmoji.tsx index 06c9b25c2..f24e72c05 100644 --- a/src/components/middle/message/AnimatedCustomEmoji.tsx +++ b/src/components/middle/message/AnimatedCustomEmoji.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { withGlobal } from '../../../global'; import type { ApiSticker } from '../../../api/types'; diff --git a/src/components/middle/message/AnimatedEmoji.tsx b/src/components/middle/message/AnimatedEmoji.tsx index 6616b5237..20080e720 100644 --- a/src/components/middle/message/AnimatedEmoji.tsx +++ b/src/components/middle/message/AnimatedEmoji.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { withGlobal } from '../../../global'; import type { ApiSticker } from '../../../api/types'; diff --git a/src/components/middle/message/BaseStory.tsx b/src/components/middle/message/BaseStory.tsx index 387b13f30..352fed4ac 100644 --- a/src/components/middle/message/BaseStory.tsx +++ b/src/components/middle/message/BaseStory.tsx @@ -1,4 +1,4 @@ -import React, { memo, useEffect } from '../../../lib/teact/teact'; +import { memo, useEffect } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiMessageStoryData, ApiTypeStory } from '../../../api/types'; diff --git a/src/components/middle/message/CommentButton.tsx b/src/components/middle/message/CommentButton.tsx index 882d08254..def79e62e 100644 --- a/src/components/middle/message/CommentButton.tsx +++ b/src/components/middle/message/CommentButton.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import { getActions, getGlobal } from '../../../global'; import type { ApiCommentsInfo } from '../../../api/types'; diff --git a/src/components/middle/message/Contact.tsx b/src/components/middle/message/Contact.tsx index 02b066f8c..01bcf6695 100644 --- a/src/components/middle/message/Contact.tsx +++ b/src/components/middle/message/Contact.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiContact, ApiCountryCode, ApiUser } from '../../../api/types'; diff --git a/src/components/middle/message/ContextMenuContainer.async.tsx b/src/components/middle/message/ContextMenuContainer.async.tsx index 40455f229..07ad455fb 100644 --- a/src/components/middle/message/ContextMenuContainer.async.tsx +++ b/src/components/middle/message/ContextMenuContainer.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './ContextMenuContainer'; diff --git a/src/components/middle/message/ContextMenuContainer.tsx b/src/components/middle/message/ContextMenuContainer.tsx index 4b3391c8e..fd274d170 100644 --- a/src/components/middle/message/ContextMenuContainer.tsx +++ b/src/components/middle/message/ContextMenuContainer.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; diff --git a/src/components/middle/message/FactCheck.tsx b/src/components/middle/message/FactCheck.tsx index 9763c63c0..39074989f 100644 --- a/src/components/middle/message/FactCheck.tsx +++ b/src/components/middle/message/FactCheck.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo, useRef } from '../../../lib/teact/teact'; +import { memo, useMemo, useRef } from '../../../lib/teact/teact'; import type { ApiFactCheck } from '../../../api/types'; diff --git a/src/components/middle/message/Game.tsx b/src/components/middle/message/Game.tsx index d6e4b5cfa..89e6bb8a4 100644 --- a/src/components/middle/message/Game.tsx +++ b/src/components/middle/message/Game.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiMessage } from '../../../api/types'; diff --git a/src/components/middle/message/Giveaway.tsx b/src/components/middle/message/Giveaway.tsx index 1e41ceb22..e4641fd4e 100644 --- a/src/components/middle/message/Giveaway.tsx +++ b/src/components/middle/message/Giveaway.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; diff --git a/src/components/middle/message/InlineButtons.tsx b/src/components/middle/message/InlineButtons.tsx index 212ffceff..2a0119ec6 100644 --- a/src/components/middle/message/InlineButtons.tsx +++ b/src/components/middle/message/InlineButtons.tsx @@ -1,5 +1,5 @@ import type { FC, TeactNode } from '../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import type { ApiKeyboardButton, ApiMessage } from '../../../api/types'; import type { ActionPayloads } from '../../../global/types'; diff --git a/src/components/middle/message/Invoice.tsx b/src/components/middle/message/Invoice.tsx index af34dd87b..9522c6d5e 100644 --- a/src/components/middle/message/Invoice.tsx +++ b/src/components/middle/message/Invoice.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useRef } from '../../../lib/teact/teact'; +import { memo, useRef } from '../../../lib/teact/teact'; import type { ApiMessage } from '../../../api/types'; import type { ThemeKey } from '../../../types'; diff --git a/src/components/middle/message/InvoiceMediaPreview.tsx b/src/components/middle/message/InvoiceMediaPreview.tsx index e5df0bcde..fe30157bd 100644 --- a/src/components/middle/message/InvoiceMediaPreview.tsx +++ b/src/components/middle/message/InvoiceMediaPreview.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiMessage } from '../../../api/types'; diff --git a/src/components/middle/message/LastEditTimeMenuItem.tsx b/src/components/middle/message/LastEditTimeMenuItem.tsx index ad40d582d..ef16382b4 100644 --- a/src/components/middle/message/LastEditTimeMenuItem.tsx +++ b/src/components/middle/message/LastEditTimeMenuItem.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import type { ApiMessage } from '../../../api/types'; diff --git a/src/components/middle/message/Location.tsx b/src/components/middle/message/Location.tsx index e88fb0fc5..fe773ec09 100644 --- a/src/components/middle/message/Location.tsx +++ b/src/components/middle/message/Location.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useLayoutEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; diff --git a/src/components/middle/message/MentionLink.tsx b/src/components/middle/message/MentionLink.tsx index e517b3d92..53f28cffb 100644 --- a/src/components/middle/message/MentionLink.tsx +++ b/src/components/middle/message/MentionLink.tsx @@ -1,5 +1,4 @@ import type { TeactNode } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiPeer } from '../../../api/types'; diff --git a/src/components/middle/message/Message.tsx b/src/components/middle/message/Message.tsx index 0a926ce6e..7a02bcfca 100644 --- a/src/components/middle/message/Message.tsx +++ b/src/components/middle/message/Message.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useCallback, useEffect, diff --git a/src/components/middle/message/MessageAppendix.tsx b/src/components/middle/message/MessageAppendix.tsx index 394f8c83a..ea7a281ca 100644 --- a/src/components/middle/message/MessageAppendix.tsx +++ b/src/components/middle/message/MessageAppendix.tsx @@ -1,5 +1,3 @@ -import React from '../../../lib/teact/teact'; - interface OwnProps { isOwn?: boolean; } diff --git a/src/components/middle/message/MessageContextMenu.tsx b/src/components/middle/message/MessageContextMenu.tsx index 48fab79e6..1a66e1541 100644 --- a/src/components/middle/message/MessageContextMenu.tsx +++ b/src/components/middle/message/MessageContextMenu.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; diff --git a/src/components/middle/message/MessageEffect.tsx b/src/components/middle/message/MessageEffect.tsx index 86f3405e3..c49ed9454 100644 --- a/src/components/middle/message/MessageEffect.tsx +++ b/src/components/middle/message/MessageEffect.tsx @@ -1,4 +1,4 @@ -import React, { memo, useEffect, useRef } from '../../../lib/teact/teact'; +import { memo, useEffect, useRef } from '../../../lib/teact/teact'; import type { ApiAvailableEffect } from '../../../api/types'; diff --git a/src/components/middle/message/MessageMeta.tsx b/src/components/middle/message/MessageMeta.tsx index 2e74bda70..4e34818ac 100644 --- a/src/components/middle/message/MessageMeta.tsx +++ b/src/components/middle/message/MessageMeta.tsx @@ -1,5 +1,6 @@ import type { FC, TeactNode } from '../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { diff --git a/src/components/middle/message/MessagePhoneCall.tsx b/src/components/middle/message/MessagePhoneCall.tsx index 4f35e7d65..c908a48db 100644 --- a/src/components/middle/message/MessagePhoneCall.tsx +++ b/src/components/middle/message/MessagePhoneCall.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiMessage } from '../../../api/types'; diff --git a/src/components/middle/message/PaidMediaOverlay.tsx b/src/components/middle/message/PaidMediaOverlay.tsx index 7a7244de9..c888ed843 100644 --- a/src/components/middle/message/PaidMediaOverlay.tsx +++ b/src/components/middle/message/PaidMediaOverlay.tsx @@ -1,4 +1,5 @@ -import React, { memo, type TeactNode, useMemo } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo, type TeactNode, useMemo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiPaidMedia } from '../../../api/types'; diff --git a/src/components/middle/message/Photo.tsx b/src/components/middle/message/Photo.tsx index 36b4beb9a..cdff27bb5 100644 --- a/src/components/middle/message/Photo.tsx +++ b/src/components/middle/message/Photo.tsx @@ -1,4 +1,5 @@ -import React, { useEffect, useRef, useState } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { useEffect, useRef, useState } from '../../../lib/teact/teact'; import type { ApiMediaExtendedPreview, ApiPhoto } from '../../../api/types'; import type { ObserveFn } from '../../../hooks/useIntersectionObserver'; diff --git a/src/components/middle/message/Poll.tsx b/src/components/middle/message/Poll.tsx index f44558567..3f26f5bb3 100644 --- a/src/components/middle/message/Poll.tsx +++ b/src/components/middle/message/Poll.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useLayoutEffect, diff --git a/src/components/middle/message/PollOption.tsx b/src/components/middle/message/PollOption.tsx index 7f7556aa8..096e288a7 100644 --- a/src/components/middle/message/PollOption.tsx +++ b/src/components/middle/message/PollOption.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { useEffect, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/middle/message/ReadTimeMenuItem.tsx b/src/components/middle/message/ReadTimeMenuItem.tsx index 6dc90f32a..f5e73a7c3 100644 --- a/src/components/middle/message/ReadTimeMenuItem.tsx +++ b/src/components/middle/message/ReadTimeMenuItem.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiMessage } from '../../../api/types'; diff --git a/src/components/middle/message/RoundVideo.tsx b/src/components/middle/message/RoundVideo.tsx index 843c3d404..04c376702 100644 --- a/src/components/middle/message/RoundVideo.tsx +++ b/src/components/middle/message/RoundVideo.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { useEffect, useLayoutEffect, useRef, useSignal, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/middle/message/SenderGroupContainer.tsx b/src/components/middle/message/SenderGroupContainer.tsx index fb678b3f1..913e0be2e 100644 --- a/src/components/middle/message/SenderGroupContainer.tsx +++ b/src/components/middle/message/SenderGroupContainer.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useRef, diff --git a/src/components/middle/message/SimilarChannels.tsx b/src/components/middle/message/SimilarChannels.tsx index 9fba8811b..e942962bc 100644 --- a/src/components/middle/message/SimilarChannels.tsx +++ b/src/components/middle/message/SimilarChannels.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; diff --git a/src/components/middle/message/SponsoredContextMenu.tsx b/src/components/middle/message/SponsoredContextMenu.tsx index 73b00234c..b802acfad 100644 --- a/src/components/middle/message/SponsoredContextMenu.tsx +++ b/src/components/middle/message/SponsoredContextMenu.tsx @@ -1,5 +1,5 @@ import type { ElementRef, FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useRef, } from '../../../lib/teact/teact'; diff --git a/src/components/middle/message/SponsoredContextMenuContainer.async.tsx b/src/components/middle/message/SponsoredContextMenuContainer.async.tsx index 380bb9ef9..942a6a207 100644 --- a/src/components/middle/message/SponsoredContextMenuContainer.async.tsx +++ b/src/components/middle/message/SponsoredContextMenuContainer.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './SponsoredContextMenuContainer'; diff --git a/src/components/middle/message/SponsoredContextMenuContainer.tsx b/src/components/middle/message/SponsoredContextMenuContainer.tsx index a9bdaa3d5..08264de53 100644 --- a/src/components/middle/message/SponsoredContextMenuContainer.tsx +++ b/src/components/middle/message/SponsoredContextMenuContainer.tsx @@ -1,5 +1,5 @@ import type { ElementRef, FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { IAnchorPosition } from '../../../types'; diff --git a/src/components/middle/message/SponsoredMessage.tsx b/src/components/middle/message/SponsoredMessage.tsx index e2f2d176c..156d9195e 100644 --- a/src/components/middle/message/SponsoredMessage.tsx +++ b/src/components/middle/message/SponsoredMessage.tsx @@ -1,5 +1,6 @@ import type { ElementRef, FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useMemo, useRef, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/middle/message/Sticker.tsx b/src/components/middle/message/Sticker.tsx index a0d5b36c3..fa250c1c8 100644 --- a/src/components/middle/message/Sticker.tsx +++ b/src/components/middle/message/Sticker.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { useEffect, useRef } from '../../../lib/teact/teact'; +import { useEffect, useRef } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiMessage } from '../../../api/types'; diff --git a/src/components/middle/message/Story.tsx b/src/components/middle/message/Story.tsx index 55e2a5138..748106e88 100644 --- a/src/components/middle/message/Story.tsx +++ b/src/components/middle/message/Story.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { withGlobal } from '../../../global'; import type { diff --git a/src/components/middle/message/StoryMention.tsx b/src/components/middle/message/StoryMention.tsx index 381f5b0ef..6073f6e4d 100644 --- a/src/components/middle/message/StoryMention.tsx +++ b/src/components/middle/message/StoryMention.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { diff --git a/src/components/middle/message/Video.tsx b/src/components/middle/message/Video.tsx index e52cfb5dc..45ca64fac 100644 --- a/src/components/middle/message/Video.tsx +++ b/src/components/middle/message/Video.tsx @@ -1,4 +1,5 @@ -import React, { useEffect, useRef, useState } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { useEffect, useRef, useState } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiMediaExtendedPreview, ApiVideo } from '../../../api/types'; diff --git a/src/components/middle/message/WebPage.tsx b/src/components/middle/message/WebPage.tsx index c6d110cb6..e34956436 100644 --- a/src/components/middle/message/WebPage.tsx +++ b/src/components/middle/message/WebPage.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useMemo, useRef } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo, useMemo, useRef } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiMessage, ApiTypeStory } from '../../../api/types'; diff --git a/src/components/middle/message/WebPageUniqueGift.tsx b/src/components/middle/message/WebPageUniqueGift.tsx index 6ff7ab306..4a7232ba6 100644 --- a/src/components/middle/message/WebPageUniqueGift.tsx +++ b/src/components/middle/message/WebPageUniqueGift.tsx @@ -1,4 +1,4 @@ -import React, { memo, useRef } from '../../../lib/teact/teact'; +import { memo, useRef } from '../../../lib/teact/teact'; import type { ApiStarGiftUnique } from '../../../api/types'; diff --git a/src/components/middle/message/actions/ChannelPhoto.tsx b/src/components/middle/message/actions/ChannelPhoto.tsx index ca1fd65ef..90963f681 100644 --- a/src/components/middle/message/actions/ChannelPhoto.tsx +++ b/src/components/middle/message/actions/ChannelPhoto.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../../lib/teact/teact'; +import { memo } from '../../../../lib/teact/teact'; import type { ApiMessageActionChatEditPhoto } from '../../../../api/types/messageActions'; diff --git a/src/components/middle/message/actions/Gift.tsx b/src/components/middle/message/actions/Gift.tsx index f6d62ff5e..7f76dea98 100644 --- a/src/components/middle/message/actions/Gift.tsx +++ b/src/components/middle/message/actions/Gift.tsx @@ -1,4 +1,4 @@ -import React, { memo, useRef } from '../../../../lib/teact/teact'; +import { memo, useRef } from '../../../../lib/teact/teact'; import { withGlobal } from '../../../../global'; import type { ApiSticker } from '../../../../api/types'; diff --git a/src/components/middle/message/actions/GiveawayPrize.tsx b/src/components/middle/message/actions/GiveawayPrize.tsx index a5d77ee44..0f0f2c742 100644 --- a/src/components/middle/message/actions/GiveawayPrize.tsx +++ b/src/components/middle/message/actions/GiveawayPrize.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo, useRef } from '../../../../lib/teact/teact'; +import { memo, useMemo, useRef } from '../../../../lib/teact/teact'; import { withGlobal } from '../../../../global'; import type { ApiChat, ApiSticker } from '../../../../api/types'; diff --git a/src/components/middle/message/actions/StarGift.tsx b/src/components/middle/message/actions/StarGift.tsx index 2711a9eb0..cab33405f 100644 --- a/src/components/middle/message/actions/StarGift.tsx +++ b/src/components/middle/message/actions/StarGift.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo, useRef } from '../../../../lib/teact/teact'; +import { memo, useMemo, useRef } from '../../../../lib/teact/teact'; import { withGlobal } from '../../../../global'; import type { ApiMessage, ApiPeer } from '../../../../api/types'; diff --git a/src/components/middle/message/actions/StarGiftUnique.tsx b/src/components/middle/message/actions/StarGiftUnique.tsx index a9e25de01..cc83868b1 100644 --- a/src/components/middle/message/actions/StarGiftUnique.tsx +++ b/src/components/middle/message/actions/StarGiftUnique.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo, useRef } from '../../../../lib/teact/teact'; +import { memo, useMemo, useRef } from '../../../../lib/teact/teact'; import { withGlobal } from '../../../../global'; import type { ApiMessage, ApiPeer } from '../../../../api/types'; diff --git a/src/components/middle/message/actions/SuggestedPhoto.tsx b/src/components/middle/message/actions/SuggestedPhoto.tsx index 6e5eb3cd5..cbd8e9f04 100644 --- a/src/components/middle/message/actions/SuggestedPhoto.tsx +++ b/src/components/middle/message/actions/SuggestedPhoto.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo, useState } from '../../../../lib/teact/teact'; +import { memo, useMemo, useState } from '../../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../../global'; import type { ApiMessageActionSuggestProfilePhoto } from '../../../../api/types/messageActions'; diff --git a/src/components/middle/message/helpers/messageActions.tsx b/src/components/middle/message/helpers/messageActions.tsx index 8736309aa..0fe64edf4 100644 --- a/src/components/middle/message/helpers/messageActions.tsx +++ b/src/components/middle/message/helpers/messageActions.tsx @@ -1,4 +1,4 @@ -import React, { type TeactNode } from '../../../../lib/teact/teact'; +import { type TeactNode } from '../../../../lib/teact/teact'; import { getActions } from '../../../../global'; import type { ApiMessage } from '../../../../api/types'; diff --git a/src/components/middle/message/hocs/withSelectControl.tsx b/src/components/middle/message/hocs/withSelectControl.tsx index 2db19d5e7..48f87f825 100644 --- a/src/components/middle/message/hocs/withSelectControl.tsx +++ b/src/components/middle/message/hocs/withSelectControl.tsx @@ -1,6 +1,6 @@ import type { MouseEvent as ReactMouseEvent } from 'react'; import type { FC } from '../../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../../lib/teact/teact'; +import { memo, useMemo } from '../../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../../global'; import type { OwnProps as PhotoProps } from '../Photo'; diff --git a/src/components/middle/message/hooks/useFluidBackgroundFilter.tsx b/src/components/middle/message/hooks/useFluidBackgroundFilter.tsx index f975b4f7a..bcd265297 100644 --- a/src/components/middle/message/hooks/useFluidBackgroundFilter.tsx +++ b/src/components/middle/message/hooks/useFluidBackgroundFilter.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from '../../../../lib/teact/teact'; +import { useEffect } from '../../../../lib/teact/teact'; import { SVG_NAMESPACE } from '../../../../config'; import { addSvgDefinition, removeSvgDefinition } from '../../../../util/svgController'; diff --git a/src/components/middle/message/reactions/ReactionButton.tsx b/src/components/middle/message/reactions/ReactionButton.tsx index 48426b6bf..62f1a4c73 100644 --- a/src/components/middle/message/reactions/ReactionButton.tsx +++ b/src/components/middle/message/reactions/ReactionButton.tsx @@ -1,4 +1,5 @@ -import React, { memo, useEffect, useRef } from '../../../../lib/teact/teact'; +import type React from '../../../../lib/teact/teact'; +import { memo, useEffect, useRef } from '../../../../lib/teact/teact'; import { getActions } from '../../../../global'; import type { diff --git a/src/components/middle/message/reactions/ReactionPicker.async.tsx b/src/components/middle/message/reactions/ReactionPicker.async.tsx index 139629310..5f3caa807 100644 --- a/src/components/middle/message/reactions/ReactionPicker.async.tsx +++ b/src/components/middle/message/reactions/ReactionPicker.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../../lib/teact/teact'; -import React from '../../../../lib/teact/teact'; import type { OwnProps } from './ReactionPicker'; diff --git a/src/components/middle/message/reactions/ReactionPicker.tsx b/src/components/middle/message/reactions/ReactionPicker.tsx index 58f902e70..e1398f6ed 100644 --- a/src/components/middle/message/reactions/ReactionPicker.tsx +++ b/src/components/middle/message/reactions/ReactionPicker.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo, useMemo, useRef } from '../../../../lib/teact/teact'; +import { memo, useMemo, useRef } from '../../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../../global'; import type { diff --git a/src/components/middle/message/reactions/ReactionPickerLimited.tsx b/src/components/middle/message/reactions/ReactionPickerLimited.tsx index 939aa0eb9..263532190 100644 --- a/src/components/middle/message/reactions/ReactionPickerLimited.tsx +++ b/src/components/middle/message/reactions/ReactionPickerLimited.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { +import { memo, useMemo, useRef, } from '../../../../lib/teact/teact'; diff --git a/src/components/middle/message/reactions/ReactionSelector.tsx b/src/components/middle/message/reactions/ReactionSelector.tsx index e0b1e819c..5d01a594c 100644 --- a/src/components/middle/message/reactions/ReactionSelector.tsx +++ b/src/components/middle/message/reactions/ReactionSelector.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo, useMemo, useRef } from '../../../../lib/teact/teact'; +import { memo, useMemo, useRef } from '../../../../lib/teact/teact'; import { getActions } from '../../../../global'; import type { diff --git a/src/components/middle/message/reactions/ReactionSelectorCustomReaction.tsx b/src/components/middle/message/reactions/ReactionSelectorCustomReaction.tsx index 4e417bf95..aaaaf945c 100644 --- a/src/components/middle/message/reactions/ReactionSelectorCustomReaction.tsx +++ b/src/components/middle/message/reactions/ReactionSelectorCustomReaction.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo, useEffect, useRef } from '../../../../lib/teact/teact'; +import { memo, useEffect, useRef } from '../../../../lib/teact/teact'; import type { ApiReaction, ApiReactionCustomEmoji, ApiReactionPaid } from '../../../../api/types'; diff --git a/src/components/middle/message/reactions/ReactionSelectorReaction.tsx b/src/components/middle/message/reactions/ReactionSelectorReaction.tsx index d9e8d3970..14c5446b9 100644 --- a/src/components/middle/message/reactions/ReactionSelectorReaction.tsx +++ b/src/components/middle/message/reactions/ReactionSelectorReaction.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo } from '../../../../lib/teact/teact'; +import { memo } from '../../../../lib/teact/teact'; import type { ApiAvailableReaction, ApiReaction } from '../../../../api/types'; diff --git a/src/components/middle/message/reactions/Reactions.tsx b/src/components/middle/message/reactions/Reactions.tsx index bc43e2286..784266c48 100644 --- a/src/components/middle/message/reactions/Reactions.tsx +++ b/src/components/middle/message/reactions/Reactions.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo, useEffect, useMemo } from '../../../../lib/teact/teact'; +import type React from '../../../../lib/teact/teact'; +import { memo, useEffect, useMemo } from '../../../../lib/teact/teact'; import { getActions, getGlobal } from '../../../../global'; import type { diff --git a/src/components/middle/message/reactions/SavedTagButton.tsx b/src/components/middle/message/reactions/SavedTagButton.tsx index b6273f985..b2e2a441a 100644 --- a/src/components/middle/message/reactions/SavedTagButton.tsx +++ b/src/components/middle/message/reactions/SavedTagButton.tsx @@ -1,4 +1,4 @@ -import React, { memo, useRef } from '../../../../lib/teact/teact'; +import { memo, useRef } from '../../../../lib/teact/teact'; import { getActions } from '../../../../global'; import type { diff --git a/src/components/middle/panes/AudioPlayer.tsx b/src/components/middle/panes/AudioPlayer.tsx index fb165512b..38455aa92 100644 --- a/src/components/middle/panes/AudioPlayer.tsx +++ b/src/components/middle/panes/AudioPlayer.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { useEffect, useMemo } from '../../../lib/teact/teact'; +import { useEffect, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { diff --git a/src/components/middle/panes/BotAdPane.tsx b/src/components/middle/panes/BotAdPane.tsx index 55c9cc5da..e992e516d 100644 --- a/src/components/middle/panes/BotAdPane.tsx +++ b/src/components/middle/panes/BotAdPane.tsx @@ -1,4 +1,5 @@ -import React, { memo, useEffect } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo, useEffect } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiSponsoredMessage } from '../../../api/types'; diff --git a/src/components/middle/panes/BotVerificationPane.tsx b/src/components/middle/panes/BotVerificationPane.tsx index 272ff22e2..869f45b7e 100644 --- a/src/components/middle/panes/BotVerificationPane.tsx +++ b/src/components/middle/panes/BotVerificationPane.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiBotVerification } from '../../../api/types'; diff --git a/src/components/middle/panes/ChatReportPane.tsx b/src/components/middle/panes/ChatReportPane.tsx index 1021553d4..55761d3c6 100644 --- a/src/components/middle/panes/ChatReportPane.tsx +++ b/src/components/middle/panes/ChatReportPane.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useEffect, useState } from '../../../lib/teact/teact'; +import { memo, useEffect, useState } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiPeer } from '../../../api/types'; diff --git a/src/components/middle/panes/HeaderPinnedMessage.tsx b/src/components/middle/panes/HeaderPinnedMessage.tsx index 083269dcd..1d617979c 100644 --- a/src/components/middle/panes/HeaderPinnedMessage.tsx +++ b/src/components/middle/panes/HeaderPinnedMessage.tsx @@ -1,4 +1,5 @@ -import React, { memo, useEffect } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo, useEffect } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiChat, ApiMessage, ApiPeer } from '../../../api/types'; diff --git a/src/components/middle/panes/PaidMessageChargePane.tsx b/src/components/middle/panes/PaidMessageChargePane.tsx index d7cccdf6f..08fcf8e39 100644 --- a/src/components/middle/panes/PaidMessageChargePane.tsx +++ b/src/components/middle/panes/PaidMessageChargePane.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { diff --git a/src/components/middle/search/MiddleSearch.async.tsx b/src/components/middle/search/MiddleSearch.async.tsx index e7a409323..f07282380 100644 --- a/src/components/middle/search/MiddleSearch.async.tsx +++ b/src/components/middle/search/MiddleSearch.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './MiddleSearch'; diff --git a/src/components/middle/search/MiddleSearch.tsx b/src/components/middle/search/MiddleSearch.tsx index 49dc2ec12..c601ba195 100644 --- a/src/components/middle/search/MiddleSearch.tsx +++ b/src/components/middle/search/MiddleSearch.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useLayoutEffect, useMemo, useRef, useState, diff --git a/src/components/middle/search/MiddleSearchResult.tsx b/src/components/middle/search/MiddleSearchResult.tsx index 7c62fd432..05f0db168 100644 --- a/src/components/middle/search/MiddleSearchResult.tsx +++ b/src/components/middle/search/MiddleSearchResult.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import type { ApiChat, ApiMessage, ApiPeer } from '../../../api/types'; diff --git a/src/components/modals/ModalContainer.tsx b/src/components/modals/ModalContainer.tsx index a1ed5f826..cabe4bac8 100644 --- a/src/components/modals/ModalContainer.tsx +++ b/src/components/modals/ModalContainer.tsx @@ -1,4 +1,5 @@ -import React, { memo } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import { withGlobal } from '../../global'; import type { TabState } from '../../global/types'; diff --git a/src/components/modals/aboutAds/AboutAdsModal.async.tsx b/src/components/modals/aboutAds/AboutAdsModal.async.tsx index f19aa9067..6f65102a3 100644 --- a/src/components/modals/aboutAds/AboutAdsModal.async.tsx +++ b/src/components/modals/aboutAds/AboutAdsModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './AboutAdsModal'; diff --git a/src/components/modals/aboutAds/AboutAdsModal.tsx b/src/components/modals/aboutAds/AboutAdsModal.tsx index b763bfec7..01b303ab5 100644 --- a/src/components/modals/aboutAds/AboutAdsModal.tsx +++ b/src/components/modals/aboutAds/AboutAdsModal.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo, useRef } from '../../../lib/teact/teact'; +import { memo, useMemo, useRef } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { TabState } from '../../../global/types'; diff --git a/src/components/modals/attachBotInstall/AttachBotInstallModal.async.tsx b/src/components/modals/attachBotInstall/AttachBotInstallModal.async.tsx index b8814742f..f2d43b8ff 100644 --- a/src/components/modals/attachBotInstall/AttachBotInstallModal.async.tsx +++ b/src/components/modals/attachBotInstall/AttachBotInstallModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './AttachBotInstallModal'; diff --git a/src/components/modals/attachBotInstall/AttachBotInstallModal.tsx b/src/components/modals/attachBotInstall/AttachBotInstallModal.tsx index 340afd1c5..f4bf1548e 100644 --- a/src/components/modals/attachBotInstall/AttachBotInstallModal.tsx +++ b/src/components/modals/attachBotInstall/AttachBotInstallModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; diff --git a/src/components/modals/boost/BoostModal.async.tsx b/src/components/modals/boost/BoostModal.async.tsx index 55300ad9c..191f31a06 100644 --- a/src/components/modals/boost/BoostModal.async.tsx +++ b/src/components/modals/boost/BoostModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './BoostModal'; diff --git a/src/components/modals/boost/BoostModal.tsx b/src/components/modals/boost/BoostModal.tsx index 3eb7e2711..c200b406e 100644 --- a/src/components/modals/boost/BoostModal.tsx +++ b/src/components/modals/boost/BoostModal.tsx @@ -1,4 +1,4 @@ -import React, { memo, useEffect, useMemo } from '../../../lib/teact/teact'; +import { memo, useEffect, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiChat, ApiChatFullInfo, ApiMyBoost } from '../../../api/types'; diff --git a/src/components/modals/chatInvite/ChatInviteModal.async.tsx b/src/components/modals/chatInvite/ChatInviteModal.async.tsx index 69e1ee5d0..be799bb08 100644 --- a/src/components/modals/chatInvite/ChatInviteModal.async.tsx +++ b/src/components/modals/chatInvite/ChatInviteModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './ChatInviteModal'; diff --git a/src/components/modals/chatInvite/ChatInviteModal.tsx b/src/components/modals/chatInvite/ChatInviteModal.tsx index 60a733a19..3e767fd72 100644 --- a/src/components/modals/chatInvite/ChatInviteModal.tsx +++ b/src/components/modals/chatInvite/ChatInviteModal.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo, useRef } from '../../../lib/teact/teact'; +import { memo, useMemo, useRef } from '../../../lib/teact/teact'; import { getActions, getGlobal } from '../../../global'; import type { TabState } from '../../../global/types'; diff --git a/src/components/modals/chatlist/ChatlistAlready.tsx b/src/components/modals/chatlist/ChatlistAlready.tsx index 048c1688e..1b4ddcb79 100644 --- a/src/components/modals/chatlist/ChatlistAlready.tsx +++ b/src/components/modals/chatlist/ChatlistAlready.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useState } from '../../../lib/teact/teact'; +import { memo, useCallback, useState } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiChatFolder, ApiChatlistInviteAlready } from '../../../api/types'; diff --git a/src/components/modals/chatlist/ChatlistDelete.tsx b/src/components/modals/chatlist/ChatlistDelete.tsx index 75d3ad284..96aed933e 100644 --- a/src/components/modals/chatlist/ChatlistDelete.tsx +++ b/src/components/modals/chatlist/ChatlistDelete.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useState } from '../../../lib/teact/teact'; +import { memo, useCallback, useState } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiChatFolder } from '../../../api/types'; diff --git a/src/components/modals/chatlist/ChatlistModal.async.tsx b/src/components/modals/chatlist/ChatlistModal.async.tsx index 5db766625..a1314db13 100644 --- a/src/components/modals/chatlist/ChatlistModal.async.tsx +++ b/src/components/modals/chatlist/ChatlistModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './ChatlistModal'; diff --git a/src/components/modals/chatlist/ChatlistModal.tsx b/src/components/modals/chatlist/ChatlistModal.tsx index 361ef5960..aa42464e0 100644 --- a/src/components/modals/chatlist/ChatlistModal.tsx +++ b/src/components/modals/chatlist/ChatlistModal.tsx @@ -1,5 +1,5 @@ import type { FC, TeactNode } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useMemo } from '../../../lib/teact/teact'; +import { memo, useCallback, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiChatFolder } from '../../../api/types'; diff --git a/src/components/modals/chatlist/ChatlistNew.tsx b/src/components/modals/chatlist/ChatlistNew.tsx index 292fba2d7..8f22dddf7 100644 --- a/src/components/modals/chatlist/ChatlistNew.tsx +++ b/src/components/modals/chatlist/ChatlistNew.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, getGlobal } from '../../../global'; diff --git a/src/components/modals/collectible/CollectibleInfoModal.async.tsx b/src/components/modals/collectible/CollectibleInfoModal.async.tsx index 867f17b62..b6b43fa81 100644 --- a/src/components/modals/collectible/CollectibleInfoModal.async.tsx +++ b/src/components/modals/collectible/CollectibleInfoModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './CollectibleInfoModal'; diff --git a/src/components/modals/collectible/CollectibleInfoModal.tsx b/src/components/modals/collectible/CollectibleInfoModal.tsx index 29bd6db34..cfcd39db3 100644 --- a/src/components/modals/collectible/CollectibleInfoModal.tsx +++ b/src/components/modals/collectible/CollectibleInfoModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useMemo, } from '../../../lib/teact/teact'; diff --git a/src/components/modals/common/TableAboutModal.tsx b/src/components/modals/common/TableAboutModal.tsx index d7db90de0..cbbd66d4f 100644 --- a/src/components/modals/common/TableAboutModal.tsx +++ b/src/components/modals/common/TableAboutModal.tsx @@ -1,4 +1,4 @@ -import React, { memo, type TeactNode } from '../../../lib/teact/teact'; +import { memo, type TeactNode } from '../../../lib/teact/teact'; import type { IconName } from '../../../types/icons'; diff --git a/src/components/modals/common/TableInfoModal.tsx b/src/components/modals/common/TableInfoModal.tsx index 5cc1f27c5..6c38e1f10 100644 --- a/src/components/modals/common/TableInfoModal.tsx +++ b/src/components/modals/common/TableInfoModal.tsx @@ -1,4 +1,4 @@ -import React, { memo, type TeactNode } from '../../../lib/teact/teact'; +import { memo, type TeactNode } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiPeer } from '../../../api/types'; diff --git a/src/components/modals/deleteAccount/DeleteAccountModal.async.tsx b/src/components/modals/deleteAccount/DeleteAccountModal.async.tsx index 8f93a4fd6..5fd97dca8 100644 --- a/src/components/modals/deleteAccount/DeleteAccountModal.async.tsx +++ b/src/components/modals/deleteAccount/DeleteAccountModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './DeleteAccountModal'; diff --git a/src/components/modals/deleteAccount/DeleteAccountModal.tsx b/src/components/modals/deleteAccount/DeleteAccountModal.tsx index 4debc8e85..46eb8db58 100644 --- a/src/components/modals/deleteAccount/DeleteAccountModal.tsx +++ b/src/components/modals/deleteAccount/DeleteAccountModal.tsx @@ -1,4 +1,4 @@ -import React, { memo, useEffect, useMemo, useState } from '../../../lib/teact/teact'; +import { memo, useEffect, useMemo, useState } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { TabState } from '../../../global/types'; diff --git a/src/components/modals/emojiStatusAccess/EmojiStatusAccessModal.async.tsx b/src/components/modals/emojiStatusAccess/EmojiStatusAccessModal.async.tsx index 49f2f4297..c39bd33c7 100644 --- a/src/components/modals/emojiStatusAccess/EmojiStatusAccessModal.async.tsx +++ b/src/components/modals/emojiStatusAccess/EmojiStatusAccessModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './EmojiStatusAccessModal'; diff --git a/src/components/modals/emojiStatusAccess/EmojiStatusAccessModal.tsx b/src/components/modals/emojiStatusAccess/EmojiStatusAccessModal.tsx index 36c3ff187..58df0ae01 100644 --- a/src/components/modals/emojiStatusAccess/EmojiStatusAccessModal.tsx +++ b/src/components/modals/emojiStatusAccess/EmojiStatusAccessModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/modals/frozenAccount/FrozenAccountModal.async.tsx b/src/components/modals/frozenAccount/FrozenAccountModal.async.tsx index 2a4ee6c1e..c88166b09 100644 --- a/src/components/modals/frozenAccount/FrozenAccountModal.async.tsx +++ b/src/components/modals/frozenAccount/FrozenAccountModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './FrozenAccountModal'; diff --git a/src/components/modals/frozenAccount/FrozenAccountModal.tsx b/src/components/modals/frozenAccount/FrozenAccountModal.tsx index 80d69e476..c2b037666 100644 --- a/src/components/modals/frozenAccount/FrozenAccountModal.tsx +++ b/src/components/modals/frozenAccount/FrozenAccountModal.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { TabState } from '../../../global/types'; diff --git a/src/components/modals/gift/GiftComposer.tsx b/src/components/modals/gift/GiftComposer.tsx index 4e06c3caf..555d01f81 100644 --- a/src/components/modals/gift/GiftComposer.tsx +++ b/src/components/modals/gift/GiftComposer.tsx @@ -1,5 +1,5 @@ import type { ChangeEvent } from 'react'; -import React, { +import { memo, useEffect, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/modals/gift/GiftItemPremium.tsx b/src/components/modals/gift/GiftItemPremium.tsx index fbcf6921f..7a40a2c8c 100644 --- a/src/components/modals/gift/GiftItemPremium.tsx +++ b/src/components/modals/gift/GiftItemPremium.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { withGlobal } from '../../../global'; import type { diff --git a/src/components/modals/gift/GiftItemStar.tsx b/src/components/modals/gift/GiftItemStar.tsx index e9456860f..30f9a4baa 100644 --- a/src/components/modals/gift/GiftItemStar.tsx +++ b/src/components/modals/gift/GiftItemStar.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo, useRef, useState } from '../../../lib/teact/teact'; +import { memo, useMemo, useRef, useState } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { diff --git a/src/components/modals/gift/GiftModal.async.tsx b/src/components/modals/gift/GiftModal.async.tsx index b332b312b..fa97c1165 100644 --- a/src/components/modals/gift/GiftModal.async.tsx +++ b/src/components/modals/gift/GiftModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './GiftModal'; diff --git a/src/components/modals/gift/GiftModal.tsx b/src/components/modals/gift/GiftModal.tsx index 1bce32869..1d53e17b5 100644 --- a/src/components/modals/gift/GiftModal.tsx +++ b/src/components/modals/gift/GiftModal.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/modals/gift/GiftModalResaleScreen.tsx b/src/components/modals/gift/GiftModalResaleScreen.tsx index 93b7893c2..f18a4087a 100644 --- a/src/components/modals/gift/GiftModalResaleScreen.tsx +++ b/src/components/modals/gift/GiftModalResaleScreen.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useMemo, useRef } from '../../../lib/teact/teact'; diff --git a/src/components/modals/gift/GiftResaleFilters.tsx b/src/components/modals/gift/GiftResaleFilters.tsx index f3986ca6e..676a7f4f9 100644 --- a/src/components/modals/gift/GiftResaleFilters.tsx +++ b/src/components/modals/gift/GiftResaleFilters.tsx @@ -1,6 +1,7 @@ import { type MouseEvent as ReactMouseEvent } from 'react'; import type { ElementRef, FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useCallback, useMemo, diff --git a/src/components/modals/gift/ResaleGiftMenuAttributeSticker.tsx b/src/components/modals/gift/ResaleGiftMenuAttributeSticker.tsx index aa89bc455..4dd6cf85e 100644 --- a/src/components/modals/gift/ResaleGiftMenuAttributeSticker.tsx +++ b/src/components/modals/gift/ResaleGiftMenuAttributeSticker.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useRef } from '../../../lib/teact/teact'; +import { memo, useRef } from '../../../lib/teact/teact'; import { withGlobal } from '../../../global'; import type { ApiSticker } from '../../../api/types'; diff --git a/src/components/modals/gift/StarGiftCategoryList.tsx b/src/components/modals/gift/StarGiftCategoryList.tsx index d1e63386a..45c8b2895 100644 --- a/src/components/modals/gift/StarGiftCategoryList.tsx +++ b/src/components/modals/gift/StarGiftCategoryList.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { withGlobal } from '../../../global'; diff --git a/src/components/modals/gift/UniqueGiftHeader.tsx b/src/components/modals/gift/UniqueGiftHeader.tsx index 71d365355..2aa83fb20 100644 --- a/src/components/modals/gift/UniqueGiftHeader.tsx +++ b/src/components/modals/gift/UniqueGiftHeader.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import type { ApiStarGiftAttributeBackdrop, ApiStarGiftAttributeModel, ApiStarGiftAttributePattern, diff --git a/src/components/modals/gift/info/GiftInfoModal.async.tsx b/src/components/modals/gift/info/GiftInfoModal.async.tsx index b93a2c83e..68ddb5a65 100644 --- a/src/components/modals/gift/info/GiftInfoModal.async.tsx +++ b/src/components/modals/gift/info/GiftInfoModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../../lib/teact/teact'; -import React from '../../../../lib/teact/teact'; import type { OwnProps } from './GiftInfoModal'; diff --git a/src/components/modals/gift/info/GiftInfoModal.tsx b/src/components/modals/gift/info/GiftInfoModal.tsx index 1b5e02f51..b458de476 100644 --- a/src/components/modals/gift/info/GiftInfoModal.tsx +++ b/src/components/modals/gift/info/GiftInfoModal.tsx @@ -1,5 +1,5 @@ import type { FC, TeactNode } from '../../../../lib/teact/teact'; -import React, { memo, useMemo, useState } from '../../../../lib/teact/teact'; +import { memo, useMemo, useState } from '../../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../../global'; import type { diff --git a/src/components/modals/gift/recipient/GiftRecipientPicker.async.tsx b/src/components/modals/gift/recipient/GiftRecipientPicker.async.tsx index a7d9a6931..54a86dfa9 100644 --- a/src/components/modals/gift/recipient/GiftRecipientPicker.async.tsx +++ b/src/components/modals/gift/recipient/GiftRecipientPicker.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../../lib/teact/teact'; -import React from '../../../../lib/teact/teact'; import type { OwnProps } from './GiftRecipientPicker'; diff --git a/src/components/modals/gift/recipient/GiftRecipientPicker.tsx b/src/components/modals/gift/recipient/GiftRecipientPicker.tsx index 09faa679e..0974433a5 100644 --- a/src/components/modals/gift/recipient/GiftRecipientPicker.tsx +++ b/src/components/modals/gift/recipient/GiftRecipientPicker.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useMemo, useState, } from '../../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../../global'; diff --git a/src/components/modals/gift/resale/GiftResalePriceComposerModal.async.tsx b/src/components/modals/gift/resale/GiftResalePriceComposerModal.async.tsx index 9557ad0bf..e60b23a1a 100644 --- a/src/components/modals/gift/resale/GiftResalePriceComposerModal.async.tsx +++ b/src/components/modals/gift/resale/GiftResalePriceComposerModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../../lib/teact/teact'; -import React from '../../../../lib/teact/teact'; import type { OwnProps } from './GiftResalePriceComposerModal'; diff --git a/src/components/modals/gift/resale/GiftResalePriceComposerModal.tsx b/src/components/modals/gift/resale/GiftResalePriceComposerModal.tsx index 7eff5acc3..3a47b6ecc 100644 --- a/src/components/modals/gift/resale/GiftResalePriceComposerModal.tsx +++ b/src/components/modals/gift/resale/GiftResalePriceComposerModal.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useState, } from '../../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../../global'; diff --git a/src/components/modals/gift/status/GiftStatusInfoModal.async.tsx b/src/components/modals/gift/status/GiftStatusInfoModal.async.tsx index 98366e320..a0c730ff0 100644 --- a/src/components/modals/gift/status/GiftStatusInfoModal.async.tsx +++ b/src/components/modals/gift/status/GiftStatusInfoModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../../lib/teact/teact'; -import React from '../../../../lib/teact/teact'; import type { OwnProps } from './GiftStatusInfoModal'; diff --git a/src/components/modals/gift/status/GiftStatusInfoModal.tsx b/src/components/modals/gift/status/GiftStatusInfoModal.tsx index 8c9b4e8f9..66ccfeded 100644 --- a/src/components/modals/gift/status/GiftStatusInfoModal.tsx +++ b/src/components/modals/gift/status/GiftStatusInfoModal.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo } from '../../../../lib/teact/teact'; +import { memo, useMemo } from '../../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../../global'; import type { diff --git a/src/components/modals/gift/transfer/GiftTransferModal.async.tsx b/src/components/modals/gift/transfer/GiftTransferModal.async.tsx index 10a8b2887..94c70cca9 100644 --- a/src/components/modals/gift/transfer/GiftTransferModal.async.tsx +++ b/src/components/modals/gift/transfer/GiftTransferModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../../lib/teact/teact'; -import React from '../../../../lib/teact/teact'; import type { OwnProps } from './GiftTransferModal'; diff --git a/src/components/modals/gift/transfer/GiftTransferModal.tsx b/src/components/modals/gift/transfer/GiftTransferModal.tsx index 96bd68071..574039030 100644 --- a/src/components/modals/gift/transfer/GiftTransferModal.tsx +++ b/src/components/modals/gift/transfer/GiftTransferModal.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useEffect, useMemo, useState, } from '../../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../../global'; diff --git a/src/components/modals/gift/upgrade/GiftUpgradeModal.async.tsx b/src/components/modals/gift/upgrade/GiftUpgradeModal.async.tsx index c27431416..9ae43c7c8 100644 --- a/src/components/modals/gift/upgrade/GiftUpgradeModal.async.tsx +++ b/src/components/modals/gift/upgrade/GiftUpgradeModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../../lib/teact/teact'; -import React from '../../../../lib/teact/teact'; import type { OwnProps } from './GiftUpgradeModal'; diff --git a/src/components/modals/gift/upgrade/GiftUpgradeModal.tsx b/src/components/modals/gift/upgrade/GiftUpgradeModal.tsx index cfa944c95..79fb6fb6c 100644 --- a/src/components/modals/gift/upgrade/GiftUpgradeModal.tsx +++ b/src/components/modals/gift/upgrade/GiftUpgradeModal.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useEffect, useMemo, useState, } from '../../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../../global'; diff --git a/src/components/modals/gift/withdraw/GiftWithdrawModal.async.tsx b/src/components/modals/gift/withdraw/GiftWithdrawModal.async.tsx index 8a874475c..3f0da9d1a 100644 --- a/src/components/modals/gift/withdraw/GiftWithdrawModal.async.tsx +++ b/src/components/modals/gift/withdraw/GiftWithdrawModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../../lib/teact/teact'; -import React from '../../../../lib/teact/teact'; import type { OwnProps } from './GiftWithdrawModal'; diff --git a/src/components/modals/gift/withdraw/GiftWithdrawModal.tsx b/src/components/modals/gift/withdraw/GiftWithdrawModal.tsx index 8a4e0ea8d..7b1df7aba 100644 --- a/src/components/modals/gift/withdraw/GiftWithdrawModal.tsx +++ b/src/components/modals/gift/withdraw/GiftWithdrawModal.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useState, } from '../../../../lib/teact/teact'; diff --git a/src/components/modals/giftcode/GiftCodeModal.async.tsx b/src/components/modals/giftcode/GiftCodeModal.async.tsx index 0b82fe47e..c5c5a33b4 100644 --- a/src/components/modals/giftcode/GiftCodeModal.async.tsx +++ b/src/components/modals/giftcode/GiftCodeModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './GiftCodeModal'; diff --git a/src/components/modals/giftcode/GiftCodeModal.tsx b/src/components/modals/giftcode/GiftCodeModal.tsx index e956c125b..51c43809d 100644 --- a/src/components/modals/giftcode/GiftCodeModal.tsx +++ b/src/components/modals/giftcode/GiftCodeModal.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiPeer } from '../../../api/types'; diff --git a/src/components/modals/inviteViaLink/InviteViaLinkModal.async.tsx b/src/components/modals/inviteViaLink/InviteViaLinkModal.async.tsx index 9b08ac373..60764435c 100644 --- a/src/components/modals/inviteViaLink/InviteViaLinkModal.async.tsx +++ b/src/components/modals/inviteViaLink/InviteViaLinkModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './InviteViaLinkModal'; diff --git a/src/components/modals/inviteViaLink/InviteViaLinkModal.tsx b/src/components/modals/inviteViaLink/InviteViaLinkModal.tsx index d983bd1f4..dc9e01e30 100644 --- a/src/components/modals/inviteViaLink/InviteViaLinkModal.tsx +++ b/src/components/modals/inviteViaLink/InviteViaLinkModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useState, diff --git a/src/components/modals/locationAccess/LocationAccessModal.async.tsx b/src/components/modals/locationAccess/LocationAccessModal.async.tsx index 9e923b0af..590071327 100644 --- a/src/components/modals/locationAccess/LocationAccessModal.async.tsx +++ b/src/components/modals/locationAccess/LocationAccessModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './LocationAccessModal'; diff --git a/src/components/modals/locationAccess/LocationAccessModal.tsx b/src/components/modals/locationAccess/LocationAccessModal.tsx index d9c565849..d74543b31 100644 --- a/src/components/modals/locationAccess/LocationAccessModal.tsx +++ b/src/components/modals/locationAccess/LocationAccessModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useRef, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/modals/map/MapModal.async.tsx b/src/components/modals/map/MapModal.async.tsx index 41c76f461..e60d11cbd 100644 --- a/src/components/modals/map/MapModal.async.tsx +++ b/src/components/modals/map/MapModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './MapModal'; diff --git a/src/components/modals/map/MapModal.tsx b/src/components/modals/map/MapModal.tsx index 509189f03..0280db87e 100644 --- a/src/components/modals/map/MapModal.tsx +++ b/src/components/modals/map/MapModal.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { TabState } from '../../../global/types'; diff --git a/src/components/modals/oneTimeMedia/OneTimeMediaModal.async.tsx b/src/components/modals/oneTimeMedia/OneTimeMediaModal.async.tsx index a991833ba..8e6ca3319 100644 --- a/src/components/modals/oneTimeMedia/OneTimeMediaModal.async.tsx +++ b/src/components/modals/oneTimeMedia/OneTimeMediaModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './OneTimeMediaModal'; diff --git a/src/components/modals/oneTimeMedia/OneTimeMediaModal.tsx b/src/components/modals/oneTimeMedia/OneTimeMediaModal.tsx index 8f450d57b..b24ae6b97 100644 --- a/src/components/modals/oneTimeMedia/OneTimeMediaModal.tsx +++ b/src/components/modals/oneTimeMedia/OneTimeMediaModal.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions, getGlobal } from '../../../global'; import type { TabState } from '../../../global/types'; diff --git a/src/components/modals/paidReaction/PaidReactionModal.async.tsx b/src/components/modals/paidReaction/PaidReactionModal.async.tsx index 02d52f042..b580477ee 100644 --- a/src/components/modals/paidReaction/PaidReactionModal.async.tsx +++ b/src/components/modals/paidReaction/PaidReactionModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './PaidReactionModal'; diff --git a/src/components/modals/paidReaction/PaidReactionModal.tsx b/src/components/modals/paidReaction/PaidReactionModal.tsx index fd3d75d74..c0c7102ee 100644 --- a/src/components/modals/paidReaction/PaidReactionModal.tsx +++ b/src/components/modals/paidReaction/PaidReactionModal.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; diff --git a/src/components/modals/paidReaction/StarSlider.tsx b/src/components/modals/paidReaction/StarSlider.tsx index a103fa120..08e618acc 100644 --- a/src/components/modals/paidReaction/StarSlider.tsx +++ b/src/components/modals/paidReaction/StarSlider.tsx @@ -1,4 +1,5 @@ -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useMemo, useRef, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/modals/preparedMessage/PreparedMessageModal.async.tsx b/src/components/modals/preparedMessage/PreparedMessageModal.async.tsx index 73b314370..8f0b53851 100644 --- a/src/components/modals/preparedMessage/PreparedMessageModal.async.tsx +++ b/src/components/modals/preparedMessage/PreparedMessageModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './PreparedMessageModal'; diff --git a/src/components/modals/preparedMessage/PreparedMessageModal.tsx b/src/components/modals/preparedMessage/PreparedMessageModal.tsx index 8cb66d99d..e07b53272 100644 --- a/src/components/modals/preparedMessage/PreparedMessageModal.tsx +++ b/src/components/modals/preparedMessage/PreparedMessageModal.tsx @@ -1,4 +1,4 @@ -import React, { +import { type FC, memo, useMemo, useRef, } from '../../../lib/teact/teact'; diff --git a/src/components/modals/prompt/PromptDialog.tsx b/src/components/modals/prompt/PromptDialog.tsx index 98419df17..433595482 100644 --- a/src/components/modals/prompt/PromptDialog.tsx +++ b/src/components/modals/prompt/PromptDialog.tsx @@ -1,4 +1,5 @@ -import React, { memo, useState } from '../../../lib/teact/teact'; +import type React from '../../../lib/teact/teact'; +import { memo, useState } from '../../../lib/teact/teact'; import useLastCallback from '../../../hooks/useLastCallback'; import useOldLang from '../../../hooks/useOldLang'; diff --git a/src/components/modals/reportAd/ReportAdModal.async.tsx b/src/components/modals/reportAd/ReportAdModal.async.tsx index 91bb6f7dc..3ad4d7dc5 100644 --- a/src/components/modals/reportAd/ReportAdModal.async.tsx +++ b/src/components/modals/reportAd/ReportAdModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './ReportAdModal'; diff --git a/src/components/modals/reportAd/ReportAdModal.tsx b/src/components/modals/reportAd/ReportAdModal.tsx index 9bf74699b..f8cf15134 100644 --- a/src/components/modals/reportAd/ReportAdModal.tsx +++ b/src/components/modals/reportAd/ReportAdModal.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useEffect, useMemo, useRef, } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; diff --git a/src/components/modals/reportModal/ReportModal.async.tsx b/src/components/modals/reportModal/ReportModal.async.tsx index 678748a05..f45d988aa 100644 --- a/src/components/modals/reportModal/ReportModal.async.tsx +++ b/src/components/modals/reportModal/ReportModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './ReportModal'; diff --git a/src/components/modals/reportModal/ReportModal.tsx b/src/components/modals/reportModal/ReportModal.tsx index 9c8849eed..564b8b3b3 100644 --- a/src/components/modals/reportModal/ReportModal.tsx +++ b/src/components/modals/reportModal/ReportModal.tsx @@ -1,5 +1,5 @@ import type { ChangeEvent } from 'react'; -import React, { +import { memo, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; diff --git a/src/components/modals/sharePreparedMessage/SharePreparedMessageModal.async.tsx b/src/components/modals/sharePreparedMessage/SharePreparedMessageModal.async.tsx index 143753f40..f6983de10 100644 --- a/src/components/modals/sharePreparedMessage/SharePreparedMessageModal.async.tsx +++ b/src/components/modals/sharePreparedMessage/SharePreparedMessageModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './SharePreparedMessageModal'; diff --git a/src/components/modals/sharePreparedMessage/SharePreparedMessageModal.tsx b/src/components/modals/sharePreparedMessage/SharePreparedMessageModal.tsx index 2f8d30fc2..56b4ecdf8 100644 --- a/src/components/modals/sharePreparedMessage/SharePreparedMessageModal.tsx +++ b/src/components/modals/sharePreparedMessage/SharePreparedMessageModal.tsx @@ -1,4 +1,4 @@ -import React, { +import { type FC, memo, useEffect, } from '../../../lib/teact/teact'; diff --git a/src/components/modals/stars/BalanceBlock.tsx b/src/components/modals/stars/BalanceBlock.tsx index 15536bd1b..f226a2ed3 100644 --- a/src/components/modals/stars/BalanceBlock.tsx +++ b/src/components/modals/stars/BalanceBlock.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiStarsAmount } from '../../../api/types'; diff --git a/src/components/modals/stars/StarTopupOptionList.tsx b/src/components/modals/stars/StarTopupOptionList.tsx index 1308efcda..9dc945dad 100644 --- a/src/components/modals/stars/StarTopupOptionList.tsx +++ b/src/components/modals/stars/StarTopupOptionList.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, } from '../../../lib/teact/teact'; diff --git a/src/components/modals/stars/StarsBalanceModal.async.tsx b/src/components/modals/stars/StarsBalanceModal.async.tsx index ae9e843c7..a73ac310b 100644 --- a/src/components/modals/stars/StarsBalanceModal.async.tsx +++ b/src/components/modals/stars/StarsBalanceModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './StarsBalanceModal'; diff --git a/src/components/modals/stars/StarsBalanceModal.tsx b/src/components/modals/stars/StarsBalanceModal.tsx index 5853f5c53..6fda44fc6 100644 --- a/src/components/modals/stars/StarsBalanceModal.tsx +++ b/src/components/modals/stars/StarsBalanceModal.tsx @@ -1,4 +1,5 @@ -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; diff --git a/src/components/modals/stars/StarsPaymentModal.async.tsx b/src/components/modals/stars/StarsPaymentModal.async.tsx index d53b3589e..6605cc96a 100644 --- a/src/components/modals/stars/StarsPaymentModal.async.tsx +++ b/src/components/modals/stars/StarsPaymentModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './StarsPaymentModal'; diff --git a/src/components/modals/stars/StarsPaymentModal.tsx b/src/components/modals/stars/StarsPaymentModal.tsx index 4369a4f14..db47a7a8f 100644 --- a/src/components/modals/stars/StarsPaymentModal.tsx +++ b/src/components/modals/stars/StarsPaymentModal.tsx @@ -1,4 +1,4 @@ -import React, { memo, useEffect, useMemo } from '../../../lib/teact/teact'; +import { memo, useEffect, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { diff --git a/src/components/modals/stars/chatRefund/ChatRefundModal.async.tsx b/src/components/modals/stars/chatRefund/ChatRefundModal.async.tsx index 0ef2aeae4..4aed9eaf5 100644 --- a/src/components/modals/stars/chatRefund/ChatRefundModal.async.tsx +++ b/src/components/modals/stars/chatRefund/ChatRefundModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../../lib/teact/teact'; -import React from '../../../../lib/teact/teact'; import type { OwnProps } from './ChatRefundModal'; diff --git a/src/components/modals/stars/chatRefund/ChatRefundModal.tsx b/src/components/modals/stars/chatRefund/ChatRefundModal.tsx index b7e870122..5b45a1758 100644 --- a/src/components/modals/stars/chatRefund/ChatRefundModal.tsx +++ b/src/components/modals/stars/chatRefund/ChatRefundModal.tsx @@ -1,4 +1,4 @@ -import React, { memo, useState } from '../../../../lib/teact/teact'; +import { memo, useState } from '../../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../../global'; import type { ApiUser } from '../../../../api/types'; diff --git a/src/components/modals/stars/gift/StarsGiftModal.async.tsx b/src/components/modals/stars/gift/StarsGiftModal.async.tsx index bfc87ed39..51ca2804c 100644 --- a/src/components/modals/stars/gift/StarsGiftModal.async.tsx +++ b/src/components/modals/stars/gift/StarsGiftModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../../lib/teact/teact'; -import React from '../../../../lib/teact/teact'; import type { OwnProps } from './StarsGiftModal'; diff --git a/src/components/modals/stars/gift/StarsGiftModal.tsx b/src/components/modals/stars/gift/StarsGiftModal.tsx index 33dcd011f..29e50772c 100644 --- a/src/components/modals/stars/gift/StarsGiftModal.tsx +++ b/src/components/modals/stars/gift/StarsGiftModal.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { +import type React from '../../../../lib/teact/teact'; +import { memo, useEffect, useMemo, useRef, useState, } from '../../../../lib/teact/teact'; diff --git a/src/components/modals/stars/subscription/StarsSubscriptionItem.tsx b/src/components/modals/stars/subscription/StarsSubscriptionItem.tsx index ddccd68ae..67f1cb7ea 100644 --- a/src/components/modals/stars/subscription/StarsSubscriptionItem.tsx +++ b/src/components/modals/stars/subscription/StarsSubscriptionItem.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../../lib/teact/teact'; +import { memo } from '../../../../lib/teact/teact'; import { getActions } from '../../../../global'; import type { diff --git a/src/components/modals/stars/subscription/StarsSubscriptionModal.async.tsx b/src/components/modals/stars/subscription/StarsSubscriptionModal.async.tsx index f18171c0d..2867db927 100644 --- a/src/components/modals/stars/subscription/StarsSubscriptionModal.async.tsx +++ b/src/components/modals/stars/subscription/StarsSubscriptionModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../../lib/teact/teact'; -import React from '../../../../lib/teact/teact'; import type { OwnProps } from './StarsSubscriptionModal'; diff --git a/src/components/modals/stars/subscription/StarsSubscriptionModal.tsx b/src/components/modals/stars/subscription/StarsSubscriptionModal.tsx index ee6dc2401..12fc1b33f 100644 --- a/src/components/modals/stars/subscription/StarsSubscriptionModal.tsx +++ b/src/components/modals/stars/subscription/StarsSubscriptionModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../../lib/teact/teact'; +import { memo, useMemo } from '../../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../../global'; import type { diff --git a/src/components/modals/stars/transaction/PaidMediaThumb.tsx b/src/components/modals/stars/transaction/PaidMediaThumb.tsx index 9620219ec..a4957ef5e 100644 --- a/src/components/modals/stars/transaction/PaidMediaThumb.tsx +++ b/src/components/modals/stars/transaction/PaidMediaThumb.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../../lib/teact/teact'; +import { memo } from '../../../../lib/teact/teact'; import type { ApiMediaExtendedPreview, BoughtPaidMedia } from '../../../../api/types'; diff --git a/src/components/modals/stars/transaction/StarsTransactionItem.tsx b/src/components/modals/stars/transaction/StarsTransactionItem.tsx index 57674f9de..0f8b5a196 100644 --- a/src/components/modals/stars/transaction/StarsTransactionItem.tsx +++ b/src/components/modals/stars/transaction/StarsTransactionItem.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo } from '../../../../lib/teact/teact'; +import { memo, useMemo } from '../../../../lib/teact/teact'; import { getActions } from '../../../../global'; import type { diff --git a/src/components/modals/stars/transaction/StarsTransactionModal.async.tsx b/src/components/modals/stars/transaction/StarsTransactionModal.async.tsx index 4c5ae155c..5e588b805 100644 --- a/src/components/modals/stars/transaction/StarsTransactionModal.async.tsx +++ b/src/components/modals/stars/transaction/StarsTransactionModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../../lib/teact/teact'; -import React from '../../../../lib/teact/teact'; import type { OwnProps } from './StarsTransactionModal'; diff --git a/src/components/modals/stars/transaction/StarsTransactionModal.tsx b/src/components/modals/stars/transaction/StarsTransactionModal.tsx index 662cdfb7e..927a12b0c 100644 --- a/src/components/modals/stars/transaction/StarsTransactionModal.tsx +++ b/src/components/modals/stars/transaction/StarsTransactionModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../../lib/teact/teact'; +import { memo, useMemo } from '../../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../../global'; import type { diff --git a/src/components/modals/suggestedStatus/SuggestedStatusModal.async.tsx b/src/components/modals/suggestedStatus/SuggestedStatusModal.async.tsx index f3bd0058c..df3feee39 100644 --- a/src/components/modals/suggestedStatus/SuggestedStatusModal.async.tsx +++ b/src/components/modals/suggestedStatus/SuggestedStatusModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './SuggestedStatusModal'; diff --git a/src/components/modals/suggestedStatus/SuggestedStatusModal.tsx b/src/components/modals/suggestedStatus/SuggestedStatusModal.tsx index 6d078d640..c03a1313f 100644 --- a/src/components/modals/suggestedStatus/SuggestedStatusModal.tsx +++ b/src/components/modals/suggestedStatus/SuggestedStatusModal.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiUser } from '../../../api/types'; diff --git a/src/components/modals/urlAuth/UrlAuthModal.async.tsx b/src/components/modals/urlAuth/UrlAuthModal.async.tsx index a23e2abe5..6b91e6372 100644 --- a/src/components/modals/urlAuth/UrlAuthModal.async.tsx +++ b/src/components/modals/urlAuth/UrlAuthModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './UrlAuthModal'; diff --git a/src/components/modals/urlAuth/UrlAuthModal.tsx b/src/components/modals/urlAuth/UrlAuthModal.tsx index 6ff6cf96f..7fb89a2ee 100644 --- a/src/components/modals/urlAuth/UrlAuthModal.tsx +++ b/src/components/modals/urlAuth/UrlAuthModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useState, } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; diff --git a/src/components/modals/webApp/MinimizedWebAppModal.tsx b/src/components/modals/webApp/MinimizedWebAppModal.tsx index 5025d3c34..5e7ebbb70 100644 --- a/src/components/modals/webApp/MinimizedWebAppModal.tsx +++ b/src/components/modals/webApp/MinimizedWebAppModal.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useMemo, useRef, } from '../../../lib/teact/teact'; diff --git a/src/components/modals/webApp/MoreAppsTabContent.tsx b/src/components/modals/webApp/MoreAppsTabContent.tsx index 6a127bac9..3409c5869 100644 --- a/src/components/modals/webApp/MoreAppsTabContent.tsx +++ b/src/components/modals/webApp/MoreAppsTabContent.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, diff --git a/src/components/modals/webApp/WebAppGridItem.tsx b/src/components/modals/webApp/WebAppGridItem.tsx index 322c85317..eddaf61d8 100644 --- a/src/components/modals/webApp/WebAppGridItem.tsx +++ b/src/components/modals/webApp/WebAppGridItem.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { diff --git a/src/components/modals/webApp/WebAppModal.async.tsx b/src/components/modals/webApp/WebAppModal.async.tsx index 3d068d8fb..5cf7f6a50 100644 --- a/src/components/modals/webApp/WebAppModal.async.tsx +++ b/src/components/modals/webApp/WebAppModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './WebAppModal'; diff --git a/src/components/modals/webApp/WebAppModal.tsx b/src/components/modals/webApp/WebAppModal.tsx index fe9d17682..35fa97286 100644 --- a/src/components/modals/webApp/WebAppModal.tsx +++ b/src/components/modals/webApp/WebAppModal.tsx @@ -1,6 +1,6 @@ import { type MouseEvent as ReactMouseEvent } from 'react'; import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, useSignal, useState, diff --git a/src/components/modals/webApp/WebAppModalTabContent.tsx b/src/components/modals/webApp/WebAppModalTabContent.tsx index fee2f35ca..38a8d17d4 100644 --- a/src/components/modals/webApp/WebAppModalTabContent.tsx +++ b/src/components/modals/webApp/WebAppModalTabContent.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useEffect, useMemo, useRef, useState, diff --git a/src/components/payment/CardInput.tsx b/src/components/payment/CardInput.tsx index d6d72f9bc..1e61e0b11 100644 --- a/src/components/payment/CardInput.tsx +++ b/src/components/payment/CardInput.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useRef, useState, } from '../../lib/teact/teact'; diff --git a/src/components/payment/Checkout.tsx b/src/components/payment/Checkout.tsx index 60d73df30..912ac01b5 100644 --- a/src/components/payment/Checkout.tsx +++ b/src/components/payment/Checkout.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback } from '../../lib/teact/teact'; +import { memo, useCallback } from '../../lib/teact/teact'; import { getActions } from '../../global'; import type { diff --git a/src/components/payment/ConfirmPayment.tsx b/src/components/payment/ConfirmPayment.tsx index 8fbc4034c..9e8d967aa 100644 --- a/src/components/payment/ConfirmPayment.tsx +++ b/src/components/payment/ConfirmPayment.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback, useEffect } from '../../lib/teact/teact'; +import { memo, useCallback, useEffect } from '../../lib/teact/teact'; import { getActions } from '../../global'; import { TME_LINK_PREFIX } from '../../config'; diff --git a/src/components/payment/ExpiryInput.tsx b/src/components/payment/ExpiryInput.tsx index 583b86575..f47e87a16 100644 --- a/src/components/payment/ExpiryInput.tsx +++ b/src/components/payment/ExpiryInput.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback } from '../../lib/teact/teact'; +import { memo, useCallback } from '../../lib/teact/teact'; import { formatCardExpiry } from '../middle/helpers/inputFormatters'; diff --git a/src/components/payment/PasswordConfirm.tsx b/src/components/payment/PasswordConfirm.tsx index 1fbaf7438..19414a494 100644 --- a/src/components/payment/PasswordConfirm.tsx +++ b/src/components/payment/PasswordConfirm.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useMemo, useState } from '../../lib/teact/teact'; +import { memo, useMemo, useState } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { ApiPaymentCredentials } from '../../api/types'; diff --git a/src/components/payment/PaymentInfo.tsx b/src/components/payment/PaymentInfo.tsx index 542808515..9dd1d1d61 100644 --- a/src/components/payment/PaymentInfo.tsx +++ b/src/components/payment/PaymentInfo.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useRef, } from '../../lib/teact/teact'; diff --git a/src/components/payment/PaymentModal.async.tsx b/src/components/payment/PaymentModal.async.tsx index 0c53b53e2..129a28d4c 100644 --- a/src/components/payment/PaymentModal.async.tsx +++ b/src/components/payment/PaymentModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './PaymentModal'; diff --git a/src/components/payment/PaymentModal.tsx b/src/components/payment/PaymentModal.tsx index 488bedcae..0f2a60e9d 100644 --- a/src/components/payment/PaymentModal.tsx +++ b/src/components/payment/PaymentModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useState, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/payment/ReceiptModal.async.tsx b/src/components/payment/ReceiptModal.async.tsx index 55ebe38ef..a448a3299 100644 --- a/src/components/payment/ReceiptModal.async.tsx +++ b/src/components/payment/ReceiptModal.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './ReceiptModal'; diff --git a/src/components/payment/ReceiptModal.tsx b/src/components/payment/ReceiptModal.tsx index adad29b75..690613a55 100644 --- a/src/components/payment/ReceiptModal.tsx +++ b/src/components/payment/ReceiptModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useEffect, useMemo } from '../../lib/teact/teact'; +import { memo, useEffect, useMemo } from '../../lib/teact/teact'; import { withGlobal } from '../../global'; import type { ApiReceiptRegular, ApiShippingAddress } from '../../api/types'; diff --git a/src/components/payment/SavedPaymentCredentials.tsx b/src/components/payment/SavedPaymentCredentials.tsx index 026717bd9..b18c88cf4 100644 --- a/src/components/payment/SavedPaymentCredentials.tsx +++ b/src/components/payment/SavedPaymentCredentials.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback, useMemo } from '../../lib/teact/teact'; +import { memo, useCallback, useMemo } from '../../lib/teact/teact'; import type { ApiPaymentCredentials } from '../../api/types'; import type { FormEditDispatch, FormState } from '../../hooks/reducers/usePaymentReducer'; diff --git a/src/components/payment/Shipping.tsx b/src/components/payment/Shipping.tsx index c370583c4..12de51465 100644 --- a/src/components/payment/Shipping.tsx +++ b/src/components/payment/Shipping.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, } from '../../lib/teact/teact'; diff --git a/src/components/payment/ShippingInfo.tsx b/src/components/payment/ShippingInfo.tsx index da48e7878..9ccff5973 100644 --- a/src/components/payment/ShippingInfo.tsx +++ b/src/components/payment/ShippingInfo.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useRef, } from '../../lib/teact/teact'; diff --git a/src/components/right/AddChatMembers.tsx b/src/components/right/AddChatMembers.tsx index 5c645fea0..51d6c359d 100644 --- a/src/components/right/AddChatMembers.tsx +++ b/src/components/right/AddChatMembers.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, useState, } from '../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../global'; diff --git a/src/components/right/CreateTopic.async.tsx b/src/components/right/CreateTopic.async.tsx index b925fc0ee..ff35e760a 100644 --- a/src/components/right/CreateTopic.async.tsx +++ b/src/components/right/CreateTopic.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './CreateTopic'; diff --git a/src/components/right/CreateTopic.tsx b/src/components/right/CreateTopic.tsx index e2906f293..430a8e7aa 100644 --- a/src/components/right/CreateTopic.tsx +++ b/src/components/right/CreateTopic.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useCallback, useEffect, useMemo, useState, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/right/DeleteMemberModal.tsx b/src/components/right/DeleteMemberModal.tsx index 37b3d8cdd..e57ecf34e 100644 --- a/src/components/right/DeleteMemberModal.tsx +++ b/src/components/right/DeleteMemberModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback } from '../../lib/teact/teact'; +import { memo, useCallback } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { ApiChat } from '../../api/types'; diff --git a/src/components/right/EditTopic.async.tsx b/src/components/right/EditTopic.async.tsx index bd1321006..c20399eeb 100644 --- a/src/components/right/EditTopic.async.tsx +++ b/src/components/right/EditTopic.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import type { OwnProps } from './EditTopic'; diff --git a/src/components/right/EditTopic.tsx b/src/components/right/EditTopic.tsx index 9794ec018..87f3afee9 100644 --- a/src/components/right/EditTopic.tsx +++ b/src/components/right/EditTopic.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useCallback, useEffect, useMemo, useState, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/right/GifSearch.async.tsx b/src/components/right/GifSearch.async.tsx index 37d219968..f8690ae0d 100644 --- a/src/components/right/GifSearch.async.tsx +++ b/src/components/right/GifSearch.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; diff --git a/src/components/right/GifSearch.tsx b/src/components/right/GifSearch.tsx index c7d91a6e8..cec2ba85b 100644 --- a/src/components/right/GifSearch.tsx +++ b/src/components/right/GifSearch.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback, useRef } from '../../lib/teact/teact'; +import { memo, useCallback, useRef } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { ApiChat, ApiChatFullInfo, ApiVideo } from '../../api/types'; diff --git a/src/components/right/PollAnswerResults.tsx b/src/components/right/PollAnswerResults.tsx index fcbd18a8a..feea9019a 100644 --- a/src/components/right/PollAnswerResults.tsx +++ b/src/components/right/PollAnswerResults.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useState, } from '../../lib/teact/teact'; diff --git a/src/components/right/PollResults.async.tsx b/src/components/right/PollResults.async.tsx index 788e4cabe..ee42d80c1 100644 --- a/src/components/right/PollResults.async.tsx +++ b/src/components/right/PollResults.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; diff --git a/src/components/right/PollResults.tsx b/src/components/right/PollResults.tsx index 03958c30a..3e3ba03e6 100644 --- a/src/components/right/PollResults.tsx +++ b/src/components/right/PollResults.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import { withGlobal } from '../../global'; import type { ApiChat, ApiMessage, ApiPoll } from '../../api/types'; diff --git a/src/components/right/Profile.tsx b/src/components/right/Profile.tsx index b9ac72e8e..a08ec12ba 100644 --- a/src/components/right/Profile.tsx +++ b/src/components/right/Profile.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useRef, useState, } from '../../lib/teact/teact'; diff --git a/src/components/right/RightColumn.tsx b/src/components/right/RightColumn.tsx index fea7b4aaf..544f81f38 100644 --- a/src/components/right/RightColumn.tsx +++ b/src/components/right/RightColumn.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useEffect, useRef, useState, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/right/RightHeader.tsx b/src/components/right/RightHeader.tsx index 9b6842ecb..7300fd029 100644 --- a/src/components/right/RightHeader.tsx +++ b/src/components/right/RightHeader.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { useEffect, useMemo, useRef, useState, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/right/StickerSearch.async.tsx b/src/components/right/StickerSearch.async.tsx index 9e318495d..c8d060ad3 100644 --- a/src/components/right/StickerSearch.async.tsx +++ b/src/components/right/StickerSearch.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; diff --git a/src/components/right/StickerSearch.tsx b/src/components/right/StickerSearch.tsx index fd7bb4ddd..16d574538 100644 --- a/src/components/right/StickerSearch.tsx +++ b/src/components/right/StickerSearch.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useEffect, useRef, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/right/StickerSetResult.tsx b/src/components/right/StickerSetResult.tsx index 20b955a71..86dcec146 100644 --- a/src/components/right/StickerSetResult.tsx +++ b/src/components/right/StickerSetResult.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useRef, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/right/management/JoinRequest.tsx b/src/components/right/management/JoinRequest.tsx index 86178e29d..b8c5e5bef 100644 --- a/src/components/right/management/JoinRequest.tsx +++ b/src/components/right/management/JoinRequest.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback } from '../../../lib/teact/teact'; +import { memo, useCallback } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiUser } from '../../../api/types'; diff --git a/src/components/right/management/ManageBot.tsx b/src/components/right/management/ManageBot.tsx index e0b6f6df8..d12b07313 100644 --- a/src/components/right/management/ManageBot.tsx +++ b/src/components/right/management/ManageBot.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/right/management/ManageChannel.tsx b/src/components/right/management/ManageChannel.tsx index 2cc3533ed..f1afea992 100644 --- a/src/components/right/management/ManageChannel.tsx +++ b/src/components/right/management/ManageChannel.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/right/management/ManageChatAdministrators.tsx b/src/components/right/management/ManageChatAdministrators.tsx index a0208aba2..215d0b9f1 100644 --- a/src/components/right/management/ManageChatAdministrators.tsx +++ b/src/components/right/management/ManageChatAdministrators.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useMemo } from '../../../lib/teact/teact'; +import { memo, useMemo } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; import type { ApiChat, ApiChatMember } from '../../../api/types'; diff --git a/src/components/right/management/ManageChatPrivacyType.tsx b/src/components/right/management/ManageChatPrivacyType.tsx index 43e1d1732..53da4e7f2 100644 --- a/src/components/right/management/ManageChatPrivacyType.tsx +++ b/src/components/right/management/ManageChatPrivacyType.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; diff --git a/src/components/right/management/ManageChatRemovedUsers.tsx b/src/components/right/management/ManageChatRemovedUsers.tsx index c4b2f1fb4..085db260d 100644 --- a/src/components/right/management/ManageChatRemovedUsers.tsx +++ b/src/components/right/management/ManageChatRemovedUsers.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback } from '../../../lib/teact/teact'; +import { memo, useCallback } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiChat, ApiChatMember, ApiUser } from '../../../api/types'; diff --git a/src/components/right/management/ManageDiscussion.tsx b/src/components/right/management/ManageDiscussion.tsx index 72128d6d2..998361177 100644 --- a/src/components/right/management/ManageDiscussion.tsx +++ b/src/components/right/management/ManageDiscussion.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/right/management/ManageGroup.tsx b/src/components/right/management/ManageGroup.tsx index 5a4e8454f..62cd09af3 100644 --- a/src/components/right/management/ManageGroup.tsx +++ b/src/components/right/management/ManageGroup.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/right/management/ManageGroupAdminRights.tsx b/src/components/right/management/ManageGroupAdminRights.tsx index 98b3d5fee..e5ddc74e0 100644 --- a/src/components/right/management/ManageGroupAdminRights.tsx +++ b/src/components/right/management/ManageGroupAdminRights.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useCallback, useEffect, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; diff --git a/src/components/right/management/ManageGroupMembers.tsx b/src/components/right/management/ManageGroupMembers.tsx index 8a2c55853..37d4559ad 100644 --- a/src/components/right/management/ManageGroupMembers.tsx +++ b/src/components/right/management/ManageGroupMembers.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../../global'; diff --git a/src/components/right/management/ManageGroupPermissions.tsx b/src/components/right/management/ManageGroupPermissions.tsx index e00321a77..86b64c402 100644 --- a/src/components/right/management/ManageGroupPermissions.tsx +++ b/src/components/right/management/ManageGroupPermissions.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/right/management/ManageGroupUserPermissions.tsx b/src/components/right/management/ManageGroupUserPermissions.tsx index db3de642c..8ce894804 100644 --- a/src/components/right/management/ManageGroupUserPermissions.tsx +++ b/src/components/right/management/ManageGroupUserPermissions.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/right/management/ManageGroupUserPermissionsCreate.tsx b/src/components/right/management/ManageGroupUserPermissionsCreate.tsx index 66187d81c..aabe42ef3 100644 --- a/src/components/right/management/ManageGroupUserPermissionsCreate.tsx +++ b/src/components/right/management/ManageGroupUserPermissionsCreate.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useMemo } from '../../../lib/teact/teact'; +import { memo, useCallback, useMemo } from '../../../lib/teact/teact'; import { withGlobal } from '../../../global'; import type { ApiChatMember, ApiUser, ApiUserStatus } from '../../../api/types'; diff --git a/src/components/right/management/ManageInvite.tsx b/src/components/right/management/ManageInvite.tsx index 867440a42..433e67d6e 100644 --- a/src/components/right/management/ManageInvite.tsx +++ b/src/components/right/management/ManageInvite.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useState } from '../../../lib/teact/teact'; +import { memo, useCallback, useState } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiExportedInvite } from '../../../api/types'; diff --git a/src/components/right/management/ManageInviteInfo.tsx b/src/components/right/management/ManageInviteInfo.tsx index 474b9c40e..45390b258 100644 --- a/src/components/right/management/ManageInviteInfo.tsx +++ b/src/components/right/management/ManageInviteInfo.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useEffect } from '../../../lib/teact/teact'; +import { memo, useEffect } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiChatInviteImporter, ApiExportedInvite, ApiUser } from '../../../api/types'; diff --git a/src/components/right/management/ManageInvites.tsx b/src/components/right/management/ManageInvites.tsx index 95bf1c047..d8c98b85f 100644 --- a/src/components/right/management/ManageInvites.tsx +++ b/src/components/right/management/ManageInvites.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/right/management/ManageJoinRequests.tsx b/src/components/right/management/ManageJoinRequests.tsx index b693d7b50..16b5d765d 100644 --- a/src/components/right/management/ManageJoinRequests.tsx +++ b/src/components/right/management/ManageJoinRequests.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useEffect } from '../../../lib/teact/teact'; +import { memo, useCallback, useEffect } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; import type { ApiChat } from '../../../api/types'; diff --git a/src/components/right/management/ManageReactions.tsx b/src/components/right/management/ManageReactions.tsx index 829d8d2b9..e6fddc59d 100644 --- a/src/components/right/management/ManageReactions.tsx +++ b/src/components/right/management/ManageReactions.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import type React from '../../../lib/teact/teact'; +import { memo, useCallback, useEffect, useMemo, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/right/management/ManageUser.tsx b/src/components/right/management/ManageUser.tsx index 9d1f67641..7898296c9 100644 --- a/src/components/right/management/ManageUser.tsx +++ b/src/components/right/management/ManageUser.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/right/management/Management.async.tsx b/src/components/right/management/Management.async.tsx index 05c0856ad..740ade6c3 100644 --- a/src/components/right/management/Management.async.tsx +++ b/src/components/right/management/Management.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './Management'; diff --git a/src/components/right/management/Management.tsx b/src/components/right/management/Management.tsx index 75bde1d58..eeeb25214 100644 --- a/src/components/right/management/Management.tsx +++ b/src/components/right/management/Management.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { withGlobal } from '../../../global'; import type { ManagementType } from '../../../types'; diff --git a/src/components/right/management/NewDiscussionGroup.tsx b/src/components/right/management/NewDiscussionGroup.tsx index 861f31a4c..6b0339e9f 100644 --- a/src/components/right/management/NewDiscussionGroup.tsx +++ b/src/components/right/management/NewDiscussionGroup.tsx @@ -1,6 +1,7 @@ import type { FC } from '../../../lib/teact/teact.ts'; +import type React from '../../../lib/teact/teact.ts'; import { useState } from '../../../lib/teact/teact.ts'; -import React, { memo } from '../../../lib/teact/teact.ts'; +import { memo } from '../../../lib/teact/teact.ts'; import type { ApiChat } from '../../../api/types/index.ts'; import type { ManagementScreens } from '../../../types/index.ts'; diff --git a/src/components/right/management/RemoveGroupUserModal.tsx b/src/components/right/management/RemoveGroupUserModal.tsx index afe6d5b62..f919b15ad 100644 --- a/src/components/right/management/RemoveGroupUserModal.tsx +++ b/src/components/right/management/RemoveGroupUserModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useCallback, useMemo, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/right/statistics/BoostStatistics.tsx b/src/components/right/statistics/BoostStatistics.tsx index 1766b8dcc..912f809d2 100644 --- a/src/components/right/statistics/BoostStatistics.tsx +++ b/src/components/right/statistics/BoostStatistics.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/right/statistics/MessageStatistics.async.tsx b/src/components/right/statistics/MessageStatistics.async.tsx index 05f4d1bec..27ffd98da 100644 --- a/src/components/right/statistics/MessageStatistics.async.tsx +++ b/src/components/right/statistics/MessageStatistics.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './MessageStatistics'; diff --git a/src/components/right/statistics/MessageStatistics.tsx b/src/components/right/statistics/MessageStatistics.tsx index 7809f6f0e..568bb48c8 100644 --- a/src/components/right/statistics/MessageStatistics.tsx +++ b/src/components/right/statistics/MessageStatistics.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useEffect, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/right/statistics/MonetizationStatistics.tsx b/src/components/right/statistics/MonetizationStatistics.tsx index fac955a1d..12a52f824 100644 --- a/src/components/right/statistics/MonetizationStatistics.tsx +++ b/src/components/right/statistics/MonetizationStatistics.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/right/statistics/Statistics.async.tsx b/src/components/right/statistics/Statistics.async.tsx index a8d34ac44..d7ed8fffc 100644 --- a/src/components/right/statistics/Statistics.async.tsx +++ b/src/components/right/statistics/Statistics.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './Statistics'; diff --git a/src/components/right/statistics/Statistics.tsx b/src/components/right/statistics/Statistics.tsx index 31ca87805..5a8c7673c 100644 --- a/src/components/right/statistics/Statistics.tsx +++ b/src/components/right/statistics/Statistics.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useRef, useState, } from '../../../lib/teact/teact'; diff --git a/src/components/right/statistics/StatisticsMessagePublicForward.tsx b/src/components/right/statistics/StatisticsMessagePublicForward.tsx index d1af22649..3edd074a0 100644 --- a/src/components/right/statistics/StatisticsMessagePublicForward.tsx +++ b/src/components/right/statistics/StatisticsMessagePublicForward.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback, useMemo } from '../../../lib/teact/teact'; +import { memo, useCallback, useMemo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiMessagePublicForward } from '../../../api/types'; diff --git a/src/components/right/statistics/StatisticsOverview.tsx b/src/components/right/statistics/StatisticsOverview.tsx index bfa3c5a10..873cea874 100644 --- a/src/components/right/statistics/StatisticsOverview.tsx +++ b/src/components/right/statistics/StatisticsOverview.tsx @@ -1,6 +1,6 @@ import type { ReactNode } from 'react'; import type { FC } from '../../../lib/teact/teact'; -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import type { ApiBoostStatistics, ApiChannelMonetizationStatistics, diff --git a/src/components/right/statistics/StatisticsRecentMessage.tsx b/src/components/right/statistics/StatisticsRecentMessage.tsx index 1e3f74af7..9d476c0eb 100644 --- a/src/components/right/statistics/StatisticsRecentMessage.tsx +++ b/src/components/right/statistics/StatisticsRecentMessage.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../../lib/teact/teact'; -import React, { memo, useCallback } from '../../../lib/teact/teact'; +import { memo, useCallback } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { ApiMessage, StatisticsMessageInteractionCounter } from '../../../api/types'; diff --git a/src/components/right/statistics/StatisticsRecentPostMeta.tsx b/src/components/right/statistics/StatisticsRecentPostMeta.tsx index 8a80b7447..5bc652af2 100644 --- a/src/components/right/statistics/StatisticsRecentPostMeta.tsx +++ b/src/components/right/statistics/StatisticsRecentPostMeta.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import type { StatisticsMessageInteractionCounter, StatisticsStoryInteractionCounter } from '../../../api/types'; diff --git a/src/components/right/statistics/StatisticsRecentStory.tsx b/src/components/right/statistics/StatisticsRecentStory.tsx index 6788ed00c..ff772570e 100644 --- a/src/components/right/statistics/StatisticsRecentStory.tsx +++ b/src/components/right/statistics/StatisticsRecentStory.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { diff --git a/src/components/right/statistics/StatisticsStoryPublicForward.tsx b/src/components/right/statistics/StatisticsStoryPublicForward.tsx index 170943f0f..b01b00165 100644 --- a/src/components/right/statistics/StatisticsStoryPublicForward.tsx +++ b/src/components/right/statistics/StatisticsStoryPublicForward.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; import type { diff --git a/src/components/right/statistics/StoryStatistics.async.tsx b/src/components/right/statistics/StoryStatistics.async.tsx index 36f50d6f7..97616f3e2 100644 --- a/src/components/right/statistics/StoryStatistics.async.tsx +++ b/src/components/right/statistics/StoryStatistics.async.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import type { OwnProps } from './StoryStatistics'; diff --git a/src/components/right/statistics/StoryStatistics.tsx b/src/components/right/statistics/StoryStatistics.tsx index 6ebc870ef..74f9907bd 100644 --- a/src/components/right/statistics/StoryStatistics.tsx +++ b/src/components/right/statistics/StoryStatistics.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useEffect, useRef, useState, } from '../../../lib/teact/teact'; import { getActions, withGlobal } from '../../../global'; diff --git a/src/components/story/MediaStory.tsx b/src/components/story/MediaStory.tsx index d01438fea..b2c093cab 100644 --- a/src/components/story/MediaStory.tsx +++ b/src/components/story/MediaStory.tsx @@ -1,4 +1,5 @@ -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useCallback, useEffect, useRef, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/story/StealthModeModal.tsx b/src/components/story/StealthModeModal.tsx index b05d8b290..e72c621b6 100644 --- a/src/components/story/StealthModeModal.tsx +++ b/src/components/story/StealthModeModal.tsx @@ -1,4 +1,4 @@ -import React, { memo, useEffect, useState } from '../../lib/teact/teact'; +import { memo, useEffect, useState } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { ApiStealthMode } from '../../api/types'; diff --git a/src/components/story/Story.tsx b/src/components/story/Story.tsx index b0b95edbb..c35dd5dab 100644 --- a/src/components/story/Story.tsx +++ b/src/components/story/Story.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useMemo, useRef, useState, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/story/StoryCaption.tsx b/src/components/story/StoryCaption.tsx index 4e2dcfc42..7bf633f40 100644 --- a/src/components/story/StoryCaption.tsx +++ b/src/components/story/StoryCaption.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useEffect, useLayoutEffect, useRef, useState, } from '../../lib/teact/teact'; import { addExtraClass, removeExtraClass } from '../../lib/teact/teact-dom'; diff --git a/src/components/story/StoryDeleteConfirmModal.tsx b/src/components/story/StoryDeleteConfirmModal.tsx index a6048fc31..10bfe0d4f 100644 --- a/src/components/story/StoryDeleteConfirmModal.tsx +++ b/src/components/story/StoryDeleteConfirmModal.tsx @@ -1,4 +1,4 @@ -import React, { memo, useCallback } from '../../lib/teact/teact'; +import { memo, useCallback } from '../../lib/teact/teact'; import { getActions } from '../../global'; import type { ApiTypeStory } from '../../api/types'; diff --git a/src/components/story/StoryFooter.tsx b/src/components/story/StoryFooter.tsx index 473770955..04c5c69e2 100644 --- a/src/components/story/StoryFooter.tsx +++ b/src/components/story/StoryFooter.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo } from '../../lib/teact/teact'; +import { memo, useMemo } from '../../lib/teact/teact'; import { getActions, getGlobal } from '../../global'; import type { ApiStory } from '../../api/types'; diff --git a/src/components/story/StoryPreview.tsx b/src/components/story/StoryPreview.tsx index abca4bf4b..8e5194b40 100644 --- a/src/components/story/StoryPreview.tsx +++ b/src/components/story/StoryPreview.tsx @@ -1,4 +1,4 @@ -import React, { memo, useEffect, useMemo } from '../../lib/teact/teact'; +import { memo, useEffect, useMemo } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { diff --git a/src/components/story/StoryProgress.tsx b/src/components/story/StoryProgress.tsx index 7b0a713ca..a092f2d32 100644 --- a/src/components/story/StoryProgress.tsx +++ b/src/components/story/StoryProgress.tsx @@ -1,4 +1,5 @@ -import React, { +import type React from '../../lib/teact/teact'; +import { memo, } from '../../lib/teact/teact'; diff --git a/src/components/story/StoryRibbon.tsx b/src/components/story/StoryRibbon.tsx index b1fd04362..2b5f56132 100644 --- a/src/components/story/StoryRibbon.tsx +++ b/src/components/story/StoryRibbon.tsx @@ -1,4 +1,4 @@ -import React, { memo, useRef } from '../../lib/teact/teact'; +import { memo, useRef } from '../../lib/teact/teact'; import { withGlobal } from '../../global'; import type { ApiChat, ApiUser } from '../../api/types'; diff --git a/src/components/story/StoryRibbonButton.tsx b/src/components/story/StoryRibbonButton.tsx index 6d50d8451..8973df99d 100644 --- a/src/components/story/StoryRibbonButton.tsx +++ b/src/components/story/StoryRibbonButton.tsx @@ -1,4 +1,5 @@ -import React, { memo, useRef } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo, useRef } from '../../lib/teact/teact'; import { getActions } from '../../global'; import type { ApiPeer } from '../../api/types'; diff --git a/src/components/story/StorySettings.tsx b/src/components/story/StorySettings.tsx index c151c8951..407da3ca6 100644 --- a/src/components/story/StorySettings.tsx +++ b/src/components/story/StorySettings.tsx @@ -1,4 +1,5 @@ -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useMemo, useState, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/story/StorySlides.tsx b/src/components/story/StorySlides.tsx index 3fc7444ec..0dde4efcd 100644 --- a/src/components/story/StorySlides.tsx +++ b/src/components/story/StorySlides.tsx @@ -1,4 +1,5 @@ -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useLayoutEffect, useMemo, useRef, useSignal, useState, } from '../../lib/teact/teact'; import { getActions, getGlobal, withGlobal } from '../../global'; diff --git a/src/components/story/StoryToggler.tsx b/src/components/story/StoryToggler.tsx index 628a28e78..13c9ead99 100644 --- a/src/components/story/StoryToggler.tsx +++ b/src/components/story/StoryToggler.tsx @@ -1,4 +1,4 @@ -import React, { +import { beginHeavyAnimation, memo, useEffect, useMemo, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/story/StoryView.tsx b/src/components/story/StoryView.tsx index fd54d08ab..0081f0610 100644 --- a/src/components/story/StoryView.tsx +++ b/src/components/story/StoryView.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo } from '../../lib/teact/teact'; +import { memo, useMemo } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { diff --git a/src/components/story/StoryViewModal.tsx b/src/components/story/StoryViewModal.tsx index f458918c1..35c492ff6 100644 --- a/src/components/story/StoryViewModal.tsx +++ b/src/components/story/StoryViewModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useEffect, useMemo, useState, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/story/StoryViewer.async.tsx b/src/components/story/StoryViewer.async.tsx index b4b4cc29f..2a89c8138 100644 --- a/src/components/story/StoryViewer.async.tsx +++ b/src/components/story/StoryViewer.async.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import { Bundles } from '../../util/moduleLoader'; diff --git a/src/components/story/StoryViewer.tsx b/src/components/story/StoryViewer.tsx index ab472d667..c2e79930b 100644 --- a/src/components/story/StoryViewer.tsx +++ b/src/components/story/StoryViewer.tsx @@ -1,4 +1,4 @@ -import React, { +import { beginHeavyAnimation, memo, useCallback, useEffect, useState, } from '../../lib/teact/teact'; diff --git a/src/components/story/mediaArea/MediaAreaOverlay.tsx b/src/components/story/mediaArea/MediaAreaOverlay.tsx index c82ce7cce..0916ae751 100644 --- a/src/components/story/mediaArea/MediaAreaOverlay.tsx +++ b/src/components/story/mediaArea/MediaAreaOverlay.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useEffect, useRef, useState, } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; diff --git a/src/components/story/mediaArea/MediaAreaSuggestedReaction.tsx b/src/components/story/mediaArea/MediaAreaSuggestedReaction.tsx index 3eee433c0..b5e8e4557 100644 --- a/src/components/story/mediaArea/MediaAreaSuggestedReaction.tsx +++ b/src/components/story/mediaArea/MediaAreaSuggestedReaction.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useMemo, useRef, useState, } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; diff --git a/src/components/story/mediaArea/MediaAreaWeather.tsx b/src/components/story/mediaArea/MediaAreaWeather.tsx index 0fd7018ad..c0c3038b2 100644 --- a/src/components/story/mediaArea/MediaAreaWeather.tsx +++ b/src/components/story/mediaArea/MediaAreaWeather.tsx @@ -1,4 +1,4 @@ -import React, { +import { type FC, memo, useLayoutEffect, useRef, useState, diff --git a/src/components/story/privacy/AllowDenyList.tsx b/src/components/story/privacy/AllowDenyList.tsx index 3719b2108..74806931a 100644 --- a/src/components/story/privacy/AllowDenyList.tsx +++ b/src/components/story/privacy/AllowDenyList.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo, useState } from '../../../lib/teact/teact'; +import { memo, useMemo, useState } from '../../../lib/teact/teact'; import { filterPeersByQuery } from '../../../global/helpers/peers'; import { unique } from '../../../util/iteratees'; diff --git a/src/components/story/privacy/CloseFriends.tsx b/src/components/story/privacy/CloseFriends.tsx index 52f5e01da..79b52755e 100644 --- a/src/components/story/privacy/CloseFriends.tsx +++ b/src/components/story/privacy/CloseFriends.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, useCallback, useMemo, useState, } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; diff --git a/src/components/test/ErrorTest.tsx b/src/components/test/ErrorTest.tsx index 6142dff42..5f062cedd 100644 --- a/src/components/test/ErrorTest.tsx +++ b/src/components/test/ErrorTest.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import { withGlobal } from '../../global'; type OwnProps = { diff --git a/src/components/test/SubTest.tsx b/src/components/test/SubTest.tsx index 351b85b15..2dd1e7f7d 100644 --- a/src/components/test/SubTest.tsx +++ b/src/components/test/SubTest.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { useState } from '../../lib/teact/teact'; +import { useState } from '../../lib/teact/teact'; import type { ApiUpdateAuthorizationStateType } from '../../api/types'; diff --git a/src/components/test/Test.tsx b/src/components/test/Test.tsx index be7cfc7ed..557b6543a 100644 --- a/src/components/test/Test.tsx +++ b/src/components/test/Test.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { useState } from '../../lib/teact/teact'; +import { useState } from '../../lib/teact/teact'; import { withGlobal } from '../../global'; import type { GlobalState } from '../../global/types'; diff --git a/src/components/test/TestCleanupOrder.tsx b/src/components/test/TestCleanupOrder.tsx index c41c64653..2eeaede7c 100644 --- a/src/components/test/TestCleanupOrder.tsx +++ b/src/components/test/TestCleanupOrder.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useLayoutEffect, useState } from '../../lib/teact/teact'; +import { useEffect, useLayoutEffect, useState } from '../../lib/teact/teact'; const TestCleanupOrder = () => { const [, setRand] = useState(Math.random()); diff --git a/src/components/test/TestContext.tsx b/src/components/test/TestContext.tsx index fe39d968b..3287b9a78 100644 --- a/src/components/test/TestContext.tsx +++ b/src/components/test/TestContext.tsx @@ -1,4 +1,4 @@ -import React, { +import { createContext, memo, useState, } from '../../lib/teact/teact'; diff --git a/src/components/test/TestControlledInput.tsx b/src/components/test/TestControlledInput.tsx index b81f271af..b9eaf87cd 100644 --- a/src/components/test/TestControlledInput.tsx +++ b/src/components/test/TestControlledInput.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { useState } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { useState } from '../../lib/teact/teact'; const Test: FC = () => { const [inputValue, setInputValue] = useState('Controlled'); diff --git a/src/components/test/TestFragment.tsx b/src/components/test/TestFragment.tsx index c93df267b..cfc32a0db 100644 --- a/src/components/test/TestFragment.tsx +++ b/src/components/test/TestFragment.tsx @@ -1,4 +1,4 @@ -import React, { useRef, useState } from '../../lib/teact/teact'; +import { useRef, useState } from '../../lib/teact/teact'; export function App() { const [trigger, setTrigger] = useState(false); diff --git a/src/components/test/TestFragment2.tsx b/src/components/test/TestFragment2.tsx index b22d1ca8f..683f2d671 100644 --- a/src/components/test/TestFragment2.tsx +++ b/src/components/test/TestFragment2.tsx @@ -1,4 +1,4 @@ -import React, { useState } from '../../lib/teact/teact'; +import { useState } from '../../lib/teact/teact'; export function App() { const [trigger, setTrigger] = useState(true); diff --git a/src/components/test/TestLocale.tsx b/src/components/test/TestLocale.tsx index b8a405465..52215110c 100644 --- a/src/components/test/TestLocale.tsx +++ b/src/components/test/TestLocale.tsx @@ -1,5 +1,3 @@ -import React from '../../lib/teact/teact'; - import type { LangFnParameters } from '../../util/localization'; import useLang from '../../hooks/useLang'; diff --git a/src/components/test/TestNoContainer.tsx b/src/components/test/TestNoContainer.tsx index 4d2f4739c..80803f099 100644 --- a/src/components/test/TestNoContainer.tsx +++ b/src/components/test/TestNoContainer.tsx @@ -1,4 +1,4 @@ -import React, { useState } from '../../lib/teact/teact'; +import { useState } from '../../lib/teact/teact'; const INTERACTIVE = 'cursor: pointer; text-decoration: underline;'; diff --git a/src/components/test/TestNoRedundancy.tsx b/src/components/test/TestNoRedundancy.tsx index 79bbd0e4c..9fed540bd 100644 --- a/src/components/test/TestNoRedundancy.tsx +++ b/src/components/test/TestNoRedundancy.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import { getGlobal, setGlobal, withGlobal } from '../../global'; import type { GlobalState } from '../../global/types'; diff --git a/src/components/test/TestOrdered.tsx b/src/components/test/TestOrdered.tsx index 36928dda0..9b9d665cb 100644 --- a/src/components/test/TestOrdered.tsx +++ b/src/components/test/TestOrdered.tsx @@ -1,5 +1,5 @@ import type { ChangeEvent } from 'react'; -import React, { useRef, useState } from '../../lib/teact/teact'; +import { useRef, useState } from '../../lib/teact/teact'; const TestOrdered = () => { const [items, setItems] = useState>({ a: 1, b: 5, c: 10 }); diff --git a/src/components/test/TestPortal.tsx b/src/components/test/TestPortal.tsx index 9fbd99240..a5db5c8e9 100644 --- a/src/components/test/TestPortal.tsx +++ b/src/components/test/TestPortal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { useState } from '../../lib/teact/teact'; +import { useState } from '../../lib/teact/teact'; import Portal from '../ui/Portal'; diff --git a/src/components/test/TestSetContent.tsx b/src/components/test/TestSetContent.tsx index 61c2e71ae..bcea49a06 100644 --- a/src/components/test/TestSetContent.tsx +++ b/src/components/test/TestSetContent.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { useState } from '../../lib/teact/teact'; +import { useState } from '../../lib/teact/teact'; // 1. Make sure "First line" is rendered even if followed by a component with single text. // 2. Make sure it then can be normally removed (target is preserved). diff --git a/src/components/test/TestSvg.tsx b/src/components/test/TestSvg.tsx index 9e016bdfe..8f147384b 100644 --- a/src/components/test/TestSvg.tsx +++ b/src/components/test/TestSvg.tsx @@ -1,4 +1,4 @@ -import React, { useState } from '../../lib/teact/teact'; +import { useState } from '../../lib/teact/teact'; export function App() { const [stateValue, setStateValue] = useState(false); diff --git a/src/components/test/TestUpdateRef.tsx b/src/components/test/TestUpdateRef.tsx index c7825528f..02b0c285d 100644 --- a/src/components/test/TestUpdateRef.tsx +++ b/src/components/test/TestUpdateRef.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useRef, useState } from '../../lib/teact/teact'; +import { useEffect, useRef, useState } from '../../lib/teact/teact'; function TestUpdateRef() { const [isShown, setIsShown] = useState(true); diff --git a/src/components/test/testTick.tsx b/src/components/test/testTick.tsx index a0fb2b2fb..c7665397d 100644 --- a/src/components/test/testTick.tsx +++ b/src/components/test/testTick.tsx @@ -1,4 +1,3 @@ -import React from '../../lib/teact/teact'; import TeactDOM from '../../lib/teact/teact-dom'; function tick() { diff --git a/src/components/ui/AvatarEditable.tsx b/src/components/ui/AvatarEditable.tsx index 40442c183..b51d98cb1 100644 --- a/src/components/ui/AvatarEditable.tsx +++ b/src/components/ui/AvatarEditable.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useState, } from '../../lib/teact/teact'; diff --git a/src/components/ui/Badge.tsx b/src/components/ui/Badge.tsx index 882884411..d9005325f 100644 --- a/src/components/ui/Badge.tsx +++ b/src/components/ui/Badge.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/ui/Button.tsx b/src/components/ui/Button.tsx index a2e860324..d0fc52f65 100644 --- a/src/components/ui/Button.tsx +++ b/src/components/ui/Button.tsx @@ -1,6 +1,7 @@ import type { MouseEvent as ReactMouseEvent } from 'react'; import type { ElementRef, FC } from '../../lib/teact/teact'; -import React, { useRef, useState } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { useRef, useState } from '../../lib/teact/teact'; import { IS_TOUCH_ENV, MouseButton } from '../../util/browser/windowEnvironment'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/ui/Checkbox.tsx b/src/components/ui/Checkbox.tsx index e95e994b6..cc66525d9 100644 --- a/src/components/ui/Checkbox.tsx +++ b/src/components/ui/Checkbox.tsx @@ -1,6 +1,7 @@ import type { ChangeEvent } from 'react'; import type { FC, TeactNode } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useRef, useState, diff --git a/src/components/ui/CheckboxGroup.tsx b/src/components/ui/CheckboxGroup.tsx index c3d41ec7b..bbe92d7e9 100644 --- a/src/components/ui/CheckboxGroup.tsx +++ b/src/components/ui/CheckboxGroup.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent } from 'react'; import type { FC, TeactNode } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import type { ApiUser } from '../../api/types'; diff --git a/src/components/ui/ConfirmDialog.tsx b/src/components/ui/ConfirmDialog.tsx index 03f6ecd59..e258f5f3c 100644 --- a/src/components/ui/ConfirmDialog.tsx +++ b/src/components/ui/ConfirmDialog.tsx @@ -1,5 +1,6 @@ import type { FC, TeactNode } from '../../lib/teact/teact'; -import React, { memo, useCallback, useRef } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo, useCallback, useRef } from '../../lib/teact/teact'; import type { TextPart } from '../../types'; diff --git a/src/components/ui/CropModal.tsx b/src/components/ui/CropModal.tsx index f2302f8c4..03e0caea0 100644 --- a/src/components/ui/CropModal.tsx +++ b/src/components/ui/CropModal.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useCallback, useEffect, useState, } from '../../lib/teact/teact'; diff --git a/src/components/ui/Draggable.tsx b/src/components/ui/Draggable.tsx index c1190835c..70e97b8e5 100644 --- a/src/components/ui/Draggable.tsx +++ b/src/components/ui/Draggable.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useCallback, useEffect, useMemo, useRef, useState, } from '../../lib/teact/teact'; diff --git a/src/components/ui/DropdownMenu.tsx b/src/components/ui/DropdownMenu.tsx index b273e80d7..c7805884f 100644 --- a/src/components/ui/DropdownMenu.tsx +++ b/src/components/ui/DropdownMenu.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { useCallback, useMemo, useRef, useState, } from '../../lib/teact/teact'; diff --git a/src/components/ui/FloatingActionButton.tsx b/src/components/ui/FloatingActionButton.tsx index c450d1b77..df89b7f89 100644 --- a/src/components/ui/FloatingActionButton.tsx +++ b/src/components/ui/FloatingActionButton.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; import type { OwnProps as ButtonProps } from './Button'; diff --git a/src/components/ui/InfiniteScroll.tsx b/src/components/ui/InfiniteScroll.tsx index fe07f0c3b..a930517ed 100644 --- a/src/components/ui/InfiniteScroll.tsx +++ b/src/components/ui/InfiniteScroll.tsx @@ -1,6 +1,7 @@ import type { UIEvent } from 'react'; import type { ElementRef, FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { useEffect, useLayoutEffect, useMemo, useRef, } from '../../lib/teact/teact'; diff --git a/src/components/ui/InputText.tsx b/src/components/ui/InputText.tsx index 7f7c9f943..5e7908d63 100644 --- a/src/components/ui/InputText.tsx +++ b/src/components/ui/InputText.tsx @@ -2,7 +2,8 @@ import type { ChangeEvent, FormEvent, } from 'react'; import type { ElementRef, FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/ui/Link.tsx b/src/components/ui/Link.tsx index dbf559ce7..38fbdd41e 100644 --- a/src/components/ui/Link.tsx +++ b/src/components/ui/Link.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/ui/ListItem.tsx b/src/components/ui/ListItem.tsx index b833bc2e2..dd7432754 100644 --- a/src/components/ui/ListItem.tsx +++ b/src/components/ui/ListItem.tsx @@ -1,5 +1,6 @@ import type { ElementRef, FC, TeactNode } from '../../lib/teact/teact'; -import React, { useRef } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { useRef } from '../../lib/teact/teact'; import type { IconName } from '../../types/icons'; diff --git a/src/components/ui/ListItemWithOptions.tsx b/src/components/ui/ListItemWithOptions.tsx index 68425c562..dd18bb24c 100644 --- a/src/components/ui/ListItemWithOptions.tsx +++ b/src/components/ui/ListItemWithOptions.tsx @@ -1,5 +1,5 @@ import type { FC, TeactNode } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import type { CustomPeer } from '../../types'; diff --git a/src/components/ui/Loading.tsx b/src/components/ui/Loading.tsx index f5b7dea53..3dfed6d34 100644 --- a/src/components/ui/Loading.tsx +++ b/src/components/ui/Loading.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/ui/Menu.tsx b/src/components/ui/Menu.tsx index 9dbd7acf9..e186bea2a 100644 --- a/src/components/ui/Menu.tsx +++ b/src/components/ui/Menu.tsx @@ -1,6 +1,7 @@ import type { ElementRef } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { beginHeavyAnimation, type FC, memo, useEffect, useRef, } from '../../lib/teact/teact'; diff --git a/src/components/ui/MenuItem.tsx b/src/components/ui/MenuItem.tsx index 715d08c30..8bf8cb947 100644 --- a/src/components/ui/MenuItem.tsx +++ b/src/components/ui/MenuItem.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; import type { IconName } from '../../types/icons'; diff --git a/src/components/ui/MenuSeparator.tsx b/src/components/ui/MenuSeparator.tsx index b8d069dd2..4d0cdfc17 100644 --- a/src/components/ui/MenuSeparator.tsx +++ b/src/components/ui/MenuSeparator.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/ui/Modal.tsx b/src/components/ui/Modal.tsx index 902ff88c6..5d6419ae9 100644 --- a/src/components/ui/Modal.tsx +++ b/src/components/ui/Modal.tsx @@ -1,5 +1,6 @@ import type { ElementRef, FC, TeactNode } from '../../lib/teact/teact'; -import React, { beginHeavyAnimation, useEffect } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { beginHeavyAnimation, useEffect } from '../../lib/teact/teact'; import type { TextPart } from '../../types'; diff --git a/src/components/ui/ModalStarBalanceBar.tsx b/src/components/ui/ModalStarBalanceBar.tsx index dbc273eed..d56c6f839 100644 --- a/src/components/ui/ModalStarBalanceBar.tsx +++ b/src/components/ui/ModalStarBalanceBar.tsx @@ -1,4 +1,4 @@ -import React, { +import { memo, } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; diff --git a/src/components/ui/Notification.tsx b/src/components/ui/Notification.tsx index cdeb770ad..84f280f60 100644 --- a/src/components/ui/Notification.tsx +++ b/src/components/ui/Notification.tsx @@ -1,5 +1,5 @@ import type { FC } from '../../lib/teact/teact'; -import React, { +import { useEffect, useMemo, useRef, diff --git a/src/components/ui/OptimizedVideo.tsx b/src/components/ui/OptimizedVideo.tsx index 57be202a2..9d48b702b 100644 --- a/src/components/ui/OptimizedVideo.tsx +++ b/src/components/ui/OptimizedVideo.tsx @@ -1,5 +1,6 @@ import type { ElementRef } from '../../lib/teact/teact'; -import React, { memo, useMemo, useRef } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo, useMemo, useRef } from '../../lib/teact/teact'; import useBuffering from '../../hooks/useBuffering'; import useLastCallback from '../../hooks/useLastCallback'; diff --git a/src/components/ui/ProgressSpinner.tsx b/src/components/ui/ProgressSpinner.tsx index 4f673ba45..8ff42ac3f 100644 --- a/src/components/ui/ProgressSpinner.tsx +++ b/src/components/ui/ProgressSpinner.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useEffect, useRef } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useRef } from '../../lib/teact/teact'; import { requestMutation } from '../../lib/fasterdom/fasterdom'; import { animate, timingFunctions } from '../../util/animation'; diff --git a/src/components/ui/Radio.tsx b/src/components/ui/Radio.tsx index 3a879ecb5..aa1d573d6 100644 --- a/src/components/ui/Radio.tsx +++ b/src/components/ui/Radio.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent, MouseEventHandler } from 'react'; import type { FC, TeactNode } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/ui/RadioGroup.tsx b/src/components/ui/RadioGroup.tsx index 816a097e3..30c216bfa 100644 --- a/src/components/ui/RadioGroup.tsx +++ b/src/components/ui/RadioGroup.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent } from 'react'; import type { FC, TeactNode } from '../../lib/teact/teact'; -import React, { memo, useCallback } from '../../lib/teact/teact'; +import { memo, useCallback } from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/ui/RangeSlider.tsx b/src/components/ui/RangeSlider.tsx index fef49a944..e4b75d393 100644 --- a/src/components/ui/RangeSlider.tsx +++ b/src/components/ui/RangeSlider.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent } from 'react'; import type { FC, TeactNode } from '../../lib/teact/teact'; -import React, { memo, useCallback, useMemo } from '../../lib/teact/teact'; +import { memo, useCallback, useMemo } from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/ui/RangeSliderWithMarks.tsx b/src/components/ui/RangeSliderWithMarks.tsx index 70eab73b8..d7c99138a 100644 --- a/src/components/ui/RangeSliderWithMarks.tsx +++ b/src/components/ui/RangeSliderWithMarks.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../lib/teact/teact'; -import React, { +import { memo, useLayoutEffect, useMemo, useRef, } from '../../lib/teact/teact'; diff --git a/src/components/ui/ResponsiveHoverButton.tsx b/src/components/ui/ResponsiveHoverButton.tsx index 8a7bbad90..be07c1ed9 100644 --- a/src/components/ui/ResponsiveHoverButton.tsx +++ b/src/components/ui/ResponsiveHoverButton.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { useRef } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { useRef } from '../../lib/teact/teact'; import type { OwnProps as ButtonProps } from './Button'; diff --git a/src/components/ui/RippleEffect.tsx b/src/components/ui/RippleEffect.tsx index 91c233e24..de9dec9ac 100644 --- a/src/components/ui/RippleEffect.tsx +++ b/src/components/ui/RippleEffect.tsx @@ -1,5 +1,6 @@ import type { FC } from '../../lib/teact/teact'; -import React, { memo, useMemo, useState } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo, useMemo, useState } from '../../lib/teact/teact'; import { debounce } from '../../util/schedulers'; diff --git a/src/components/ui/RoundTimer.tsx b/src/components/ui/RoundTimer.tsx index 52eb5dbef..ba805c2cb 100644 --- a/src/components/ui/RoundTimer.tsx +++ b/src/components/ui/RoundTimer.tsx @@ -1,4 +1,4 @@ -import React, { memo, useEffect, useState } from '../../lib/teact/teact'; +import { memo, useEffect, useState } from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; import { formatCountdownShort } from '../../util/dates/dateFormat'; diff --git a/src/components/ui/SearchInput.tsx b/src/components/ui/SearchInput.tsx index d984dc4ab..613475421 100644 --- a/src/components/ui/SearchInput.tsx +++ b/src/components/ui/SearchInput.tsx @@ -1,6 +1,7 @@ import type { MouseEvent as ReactMouseEvent } from 'react'; import type { ElementRef, FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useEffect, useRef, } from '../../lib/teact/teact'; diff --git a/src/components/ui/Select.tsx b/src/components/ui/Select.tsx index ac212ab6d..17c04dc99 100644 --- a/src/components/ui/Select.tsx +++ b/src/components/ui/Select.tsx @@ -1,6 +1,7 @@ import type { ChangeEvent } from 'react'; import type { ElementRef, FC } from '../../lib/teact/teact'; -import React, { memo } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/ui/SelectAvatar.tsx b/src/components/ui/SelectAvatar.tsx index b1c91c898..9fc5f3f88 100644 --- a/src/components/ui/SelectAvatar.tsx +++ b/src/components/ui/SelectAvatar.tsx @@ -1,5 +1,5 @@ import type { ElementRef, FC } from '../../lib/teact/teact'; -import React, { memo, useCallback, useState } from '../../lib/teact/teact'; +import { memo, useCallback, useState } from '../../lib/teact/teact'; import { openSystemFilesDialog } from '../../util/systemFilesDialog'; diff --git a/src/components/ui/Separator.tsx b/src/components/ui/Separator.tsx index 92fabbc73..bfda26817 100644 --- a/src/components/ui/Separator.tsx +++ b/src/components/ui/Separator.tsx @@ -1,4 +1,4 @@ -import React from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/ui/ShowMoreButton.tsx b/src/components/ui/ShowMoreButton.tsx index 323fe3b0b..31bce8a73 100644 --- a/src/components/ui/ShowMoreButton.tsx +++ b/src/components/ui/ShowMoreButton.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import useOldLang from '../../hooks/useOldLang'; diff --git a/src/components/ui/ShowTransition.tsx b/src/components/ui/ShowTransition.tsx index c1e21ce37..04dc1b9d1 100644 --- a/src/components/ui/ShowTransition.tsx +++ b/src/components/ui/ShowTransition.tsx @@ -1,5 +1,6 @@ import type { ElementRef, FC } from '../../lib/teact/teact'; -import React, { useRef } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { useRef } from '../../lib/teact/teact'; import usePreviousDeprecated from '../../hooks/usePreviousDeprecated'; import useShowTransition from '../../hooks/useShowTransition'; diff --git a/src/components/ui/Spinner.tsx b/src/components/ui/Spinner.tsx index ae4a519dc..6ea25cd80 100644 --- a/src/components/ui/Spinner.tsx +++ b/src/components/ui/Spinner.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../lib/teact/teact'; -import React from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/ui/Switcher.tsx b/src/components/ui/Switcher.tsx index 82182f829..58982b0ff 100644 --- a/src/components/ui/Switcher.tsx +++ b/src/components/ui/Switcher.tsx @@ -1,6 +1,6 @@ import type { ChangeEvent } from 'react'; import type { FC } from '../../lib/teact/teact'; -import React, { memo, useCallback } from '../../lib/teact/teact'; +import { memo, useCallback } from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/ui/Tab.tsx b/src/components/ui/Tab.tsx index baa9f8a39..778b78995 100644 --- a/src/components/ui/Tab.tsx +++ b/src/components/ui/Tab.tsx @@ -1,5 +1,6 @@ import type { FC, TeactNode } from '../../lib/teact/teact'; -import React, { useEffect, useLayoutEffect, useRef } from '../../lib/teact/teact'; +import type React from '../../lib/teact/teact'; +import { useEffect, useLayoutEffect, useRef } from '../../lib/teact/teact'; import type { MenuItemContextAction } from './ListItem'; diff --git a/src/components/ui/TabList.tsx b/src/components/ui/TabList.tsx index e9e58e4d4..b44e91698 100644 --- a/src/components/ui/TabList.tsx +++ b/src/components/ui/TabList.tsx @@ -1,5 +1,5 @@ import type { FC, TeactNode } from '../../lib/teact/teact'; -import React, { memo, useEffect, useRef } from '../../lib/teact/teact'; +import { memo, useEffect, useRef } from '../../lib/teact/teact'; import type { MenuItemContextAction } from './ListItem'; diff --git a/src/components/ui/TextArea.tsx b/src/components/ui/TextArea.tsx index 3d24b8658..d57c8a71c 100644 --- a/src/components/ui/TextArea.tsx +++ b/src/components/ui/TextArea.tsx @@ -1,6 +1,7 @@ import type { ChangeEvent, FormEvent } from 'react'; import type { ElementRef, FC } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { memo, useCallback, useLayoutEffect, useRef, } from '../../lib/teact/teact'; diff --git a/src/components/ui/TextTimer.tsx b/src/components/ui/TextTimer.tsx index 4c6df7dc7..e1257da4c 100644 --- a/src/components/ui/TextTimer.tsx +++ b/src/components/ui/TextTimer.tsx @@ -1,4 +1,4 @@ -import React, { type FC, memo, useEffect } from '../../lib/teact/teact'; +import { type FC, memo, useEffect } from '../../lib/teact/teact'; import { formatMediaDuration } from '../../util/dates/dateFormat'; import { getServerTime } from '../../util/serverTime'; diff --git a/src/components/ui/Toggle.tsx b/src/components/ui/Toggle.tsx index 1e11ae1cc..eabd7849b 100644 --- a/src/components/ui/Toggle.tsx +++ b/src/components/ui/Toggle.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../lib/teact/teact'; +import { memo } from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; diff --git a/src/components/ui/Transition.tsx b/src/components/ui/Transition.tsx index 8f7d630b7..90bff5592 100644 --- a/src/components/ui/Transition.tsx +++ b/src/components/ui/Transition.tsx @@ -1,6 +1,7 @@ import type { ElementRef } from '../../lib/teact/teact'; -import React, { +import type React from '../../lib/teact/teact'; +import { beginHeavyAnimation, useEffect, useLayoutEffect, useRef, } from '../../lib/teact/teact'; import { diff --git a/src/components/ui/placeholder/PlaceholderChatInfo.tsx b/src/components/ui/placeholder/PlaceholderChatInfo.tsx index f786c7b48..f9ad4c4a7 100644 --- a/src/components/ui/placeholder/PlaceholderChatInfo.tsx +++ b/src/components/ui/placeholder/PlaceholderChatInfo.tsx @@ -1,4 +1,4 @@ -import React, { memo } from '../../../lib/teact/teact'; +import { memo } from '../../../lib/teact/teact'; import buildClassName from '../../../util/buildClassName'; diff --git a/src/components/ui/placeholder/Skeleton.tsx b/src/components/ui/placeholder/Skeleton.tsx index 4589e5d3d..50035e686 100644 --- a/src/components/ui/placeholder/Skeleton.tsx +++ b/src/components/ui/placeholder/Skeleton.tsx @@ -1,5 +1,4 @@ import type { FC } from '../../../lib/teact/teact'; -import React from '../../../lib/teact/teact'; import buildClassName from '../../../util/buildClassName'; import buildStyle from '../../../util/buildStyle'; diff --git a/src/hooks/scroll/useTopOverscroll.tsx b/src/hooks/scroll/useTopOverscroll.tsx index 00fd76efe..4b6206267 100644 --- a/src/hooks/scroll/useTopOverscroll.tsx +++ b/src/hooks/scroll/useTopOverscroll.tsx @@ -1,5 +1,5 @@ import type { ElementRef } from '../../lib/teact/teact'; -import React, { useEffect, useRef } from '../../lib/teact/teact'; +import { useEffect, useRef } from '../../lib/teact/teact'; import { forceMutation, requestMutation } from '../../lib/fasterdom/fasterdom'; import { IS_IOS, IS_SAFARI } from '../../util/browser/windowEnvironment'; diff --git a/src/hooks/stickers/useColorFilter.tsx b/src/hooks/stickers/useColorFilter.tsx index f789263e6..808ae6a0f 100644 --- a/src/hooks/stickers/useColorFilter.tsx +++ b/src/hooks/stickers/useColorFilter.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from '../../lib/teact/teact'; +import { useEffect } from '../../lib/teact/teact'; import { SVG_NAMESPACE } from '../../config'; import { addSvgDefinition, removeSvgDefinition } from '../../util/svgController'; diff --git a/src/hooks/useSchedule.tsx b/src/hooks/useSchedule.tsx index 7aaa1913e..005dd7a08 100644 --- a/src/hooks/useSchedule.tsx +++ b/src/hooks/useSchedule.tsx @@ -1,4 +1,4 @@ -import React, { useState } from '../lib/teact/teact'; +import { useState } from '../lib/teact/teact'; import { SCHEDULED_WHEN_ONLINE } from '../config'; import { getDayStartAt } from '../util/dates/dateFormat'; diff --git a/src/index.tsx b/src/index.tsx index 346f9d0d2..abe8892d5 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -2,7 +2,6 @@ import './util/handleError'; import './util/setupServiceWorker'; import './global/init'; -import React from './lib/teact/teact'; import TeactDOM from './lib/teact/teact-dom'; import { getActions, getGlobal, diff --git a/src/lib/teact/jsx-dev-runtime.ts b/src/lib/teact/jsx-dev-runtime.ts new file mode 100644 index 000000000..8789aa8d6 --- /dev/null +++ b/src/lib/teact/jsx-dev-runtime.ts @@ -0,0 +1 @@ +export * from './jsx-runtime'; diff --git a/src/lib/teact/jsx-runtime.ts b/src/lib/teact/jsx-runtime.ts new file mode 100644 index 000000000..ae0047e02 --- /dev/null +++ b/src/lib/teact/jsx-runtime.ts @@ -0,0 +1,18 @@ +import Teact, { type Props } from './teact'; +export type { JSX } from 'react'; +export const Fragment = Teact.Fragment; + +function create(type: any, props: Props = {}, key?: any) { + if (key !== undefined) props.key = key; + const children = props.children; + if (props.children !== undefined) props.children = undefined; + return Teact.createElement(type, props, children); +} + +export function jsx(type: any, props: Props, key?: any) { + return create(type, props, key); +} + +// Not implemented, reusing jsx for now +export const jsxs = jsx; +export const jsxDEV = jsx; diff --git a/src/lib/teact/teact.ts b/src/lib/teact/teact.ts index d3b2c15e0..6f25aa1d1 100644 --- a/src/lib/teact/teact.ts +++ b/src/lib/teact/teact.ts @@ -147,7 +147,7 @@ export type Context = { Provider: FC<{ value: T; children: TeactNode }>; }; -const Fragment = Symbol('Fragment'); +const Fragment = Symbol('Fragment') as unknown as FC<{ children: TeactNode }>; const DEBUG_RENDER_THRESHOLD = 7; const DEBUG_EFFECT_THRESHOLD = 7; @@ -1026,3 +1026,5 @@ export default { createElement, Fragment, }; + +export { createElement, Fragment }; diff --git a/src/util/localization/format.tsx b/src/util/localization/format.tsx index d0a33b2d3..55021375e 100644 --- a/src/util/localization/format.tsx +++ b/src/util/localization/format.tsx @@ -1,5 +1,3 @@ -import React from '../../lib/teact/teact'; - import type { LangFn } from './types'; import { STARS_ICON_PLACEHOLDER } from '../../config'; diff --git a/src/util/notifications.tsx b/src/util/notifications.tsx index 2180d518f..229fe4371 100644 --- a/src/util/notifications.tsx +++ b/src/util/notifications.tsx @@ -1,4 +1,3 @@ -import React from '../lib/teact/teact'; import { getActions, getGlobal, setGlobal } from '../global'; import type { diff --git a/tsconfig.json b/tsconfig.json index 6fccaadc1..2cd0b6f63 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,7 +21,12 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, - "jsx": "react" + "jsx": "react-jsx", + "jsxImportSource": "@teact", + "paths": { + "@teact": ["./src/lib/teact/teact.ts"], + "@teact/*": ["./src/lib/teact/*"] + } }, "include": [ "src", diff --git a/webpack.config.ts b/webpack.config.ts index 3a4040fb1..231cd2c15 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -163,6 +163,10 @@ export default function createConfig( resolve: { extensions: ['.js', '.cjs', '.mjs', '.ts', '.tsx'], + alias: { + '@teact$': path.resolve(__dirname, './src/lib/teact/teact.ts'), + '@teact': path.resolve(__dirname, './src/lib/teact'), + }, fallback: { path: require.resolve('path-browserify'), os: require.resolve('os-browserify/browser'),