1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

544 migrate to react query v4 (#547)

* Update all imports

* Update isLoading

* Update onlineManager
This commit is contained in:
xmflsct
2022-12-10 14:47:19 +01:00
committed by GitHub
parent b449d50b78
commit 357c4039cb
48 changed files with 296 additions and 431 deletions

View File

@ -56,7 +56,7 @@ const TimelineTranslate = () => {
: settingsLanguage || Localization.locale || 'en'
const [enabled, setEnabled] = useState(false)
const { refetch, data, isLoading, isSuccess, isError } = useTranslateQuery({
const { refetch, data, isFetching, isSuccess, isError } = useTranslateQuery({
source: detectedLanguage.language,
target: targetLanguage,
text,
@ -111,7 +111,7 @@ const TimelineTranslate = () => {
<CustomText
fontStyle='M'
style={{
color: isLoading || isSuccess ? colors.secondary : isError ? colors.red : colors.blue
color: isFetching || isSuccess ? colors.secondary : isError ? colors.red : colors.blue
}}
>
{isError
@ -125,7 +125,7 @@ const TimelineTranslate = () => {
})
: t('shared.translate.default')}
</CustomText>
{isLoading ? (
{isFetching ? (
<Circle
size={StyleConstants.Font.Size.M}
color={colors.disabled}