From 6743e832dce69b1fba53de4a9e49cb341f95a5c8 Mon Sep 17 00:00:00 2001 From: Maksim Sitnikov Date: Wed, 7 Aug 2024 17:40:09 +0300 Subject: [PATCH] Fix i18n hydration errors --- src/components/Themes/ui/BasicPalette/AddColorButton.tsx | 2 +- src/components/Themes/ui/BasicPalette/BasicPalette.tsx | 2 +- .../Themes/ui/BorderRadiusTab/BorderCard/BorderCard.tsx | 2 +- .../Themes/ui/BorderRadiusTab/BorderPresets/BorderPresets.tsx | 2 +- .../ui/BorderRadiusTab/ComponentPreview/ComponentPreview.tsx | 2 +- .../Themes/ui/BorderRadiusTab/CustomRadius/CustomRadius.tsx | 2 +- src/components/Themes/ui/BorderRadiusTab/Showcase/Showcase.tsx | 2 +- src/components/Themes/ui/ColorsTab/ColorsTab.tsx | 2 +- src/components/Themes/ui/ComponentPreview/ComponentPreview.tsx | 2 +- .../Themes/ui/ExportThemeSection/ExportThemeSection.tsx | 2 +- src/components/Themes/ui/MainSettings/MainSettings.tsx | 2 +- src/components/Themes/ui/ThemableSettings/ThemableCard.tsx | 2 +- .../Themes/ui/ThemeExportDialog/ThemeExportDialog.tsx | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/components/Themes/ui/BasicPalette/AddColorButton.tsx b/src/components/Themes/ui/BasicPalette/AddColorButton.tsx index 607f1d3fa364..d85752b78388 100644 --- a/src/components/Themes/ui/BasicPalette/AddColorButton.tsx +++ b/src/components/Themes/ui/BasicPalette/AddColorButton.tsx @@ -1,7 +1,7 @@ import {Plus} from 'landing-icons'; import {Button, Icon} from 'landing-uikit'; +import {useTranslation} from 'next-i18next'; import React from 'react'; -import {useTranslation} from 'react-i18next'; import {block} from '../../../../utils'; diff --git a/src/components/Themes/ui/BasicPalette/BasicPalette.tsx b/src/components/Themes/ui/BasicPalette/BasicPalette.tsx index c29dbad26d11..6b2f793bfb9f 100644 --- a/src/components/Themes/ui/BasicPalette/BasicPalette.tsx +++ b/src/components/Themes/ui/BasicPalette/BasicPalette.tsx @@ -1,5 +1,5 @@ +import {useTranslation} from 'next-i18next'; import React from 'react'; -import {useTranslation} from 'react-i18next'; import {useThemeCreatorMethods, useThemePalette} from '../../hooks'; import {ThemeVariant} from '../../lib/types'; diff --git a/src/components/Themes/ui/BorderRadiusTab/BorderCard/BorderCard.tsx b/src/components/Themes/ui/BorderRadiusTab/BorderCard/BorderCard.tsx index 85ad454058a6..f26562d7f1c9 100644 --- a/src/components/Themes/ui/BorderRadiusTab/BorderCard/BorderCard.tsx +++ b/src/components/Themes/ui/BorderRadiusTab/BorderCard/BorderCard.tsx @@ -1,5 +1,5 @@ +import {useTranslation} from 'next-i18next'; import React, {useCallback} from 'react'; -import {useTranslation} from 'react-i18next'; import {SelectableCard} from 'src/components/SelectableCard/SelectableCard'; import {RADIUS_PRESETS} from 'src/components/Themes/lib/constants'; import {RadiusPresetName} from 'src/components/Themes/lib/types'; diff --git a/src/components/Themes/ui/BorderRadiusTab/BorderPresets/BorderPresets.tsx b/src/components/Themes/ui/BorderRadiusTab/BorderPresets/BorderPresets.tsx index c920fbdded6a..5af16520186a 100644 --- a/src/components/Themes/ui/BorderRadiusTab/BorderPresets/BorderPresets.tsx +++ b/src/components/Themes/ui/BorderRadiusTab/BorderPresets/BorderPresets.tsx @@ -1,6 +1,6 @@ import {Col, Row} from 'landing-uikit'; +import {useTranslation} from 'next-i18next'; import React, {useCallback} from 'react'; -import {useTranslation} from 'react-i18next'; import {ChangeRadiusPresetInThemeParams} from 'src/components/Themes/lib/themeCreatorUtils'; import {RadiusPresetName} from 'src/components/Themes/lib/types'; diff --git a/src/components/Themes/ui/BorderRadiusTab/ComponentPreview/ComponentPreview.tsx b/src/components/Themes/ui/BorderRadiusTab/ComponentPreview/ComponentPreview.tsx index ee16aa74282f..430191079f49 100644 --- a/src/components/Themes/ui/BorderRadiusTab/ComponentPreview/ComponentPreview.tsx +++ b/src/components/Themes/ui/BorderRadiusTab/ComponentPreview/ComponentPreview.tsx @@ -1,5 +1,5 @@ +import {useTranslation} from 'next-i18next'; import React from 'react'; -import {useTranslation} from 'react-i18next'; import {useThemeCreator} from '../../../hooks'; import {exportTheme} from '../../../lib/themeCreatorExport'; diff --git a/src/components/Themes/ui/BorderRadiusTab/CustomRadius/CustomRadius.tsx b/src/components/Themes/ui/BorderRadiusTab/CustomRadius/CustomRadius.tsx index 2a1532e32778..3f530187ffbb 100644 --- a/src/components/Themes/ui/BorderRadiusTab/CustomRadius/CustomRadius.tsx +++ b/src/components/Themes/ui/BorderRadiusTab/CustomRadius/CustomRadius.tsx @@ -1,6 +1,6 @@ import {Col, Flex, Row, Text, TextInput} from 'landing-uikit'; +import {useTranslation} from 'next-i18next'; import React, {useCallback, useMemo} from 'react'; -import {useTranslation} from 'react-i18next'; import {UpdateCustomRadiusPresetInThemeParams} from 'src/components/Themes/lib/themeCreatorUtils'; import {RadiusSizeName, RadiusValue} from 'src/components/Themes/lib/types'; diff --git a/src/components/Themes/ui/BorderRadiusTab/Showcase/Showcase.tsx b/src/components/Themes/ui/BorderRadiusTab/Showcase/Showcase.tsx index 6bedddb601ac..419414e8f898 100644 --- a/src/components/Themes/ui/BorderRadiusTab/Showcase/Showcase.tsx +++ b/src/components/Themes/ui/BorderRadiusTab/Showcase/Showcase.tsx @@ -10,8 +10,8 @@ import { ThemeProvider, } from 'landing-uikit'; import type {ButtonProps} from 'landing-uikit'; +import {useTranslation} from 'next-i18next'; import React, {useMemo} from 'react'; -import {useTranslation} from 'react-i18next'; import {block} from '../../../../../utils'; diff --git a/src/components/Themes/ui/ColorsTab/ColorsTab.tsx b/src/components/Themes/ui/ColorsTab/ColorsTab.tsx index 1a75d32d3cc6..afaaa2e83a4e 100644 --- a/src/components/Themes/ui/ColorsTab/ColorsTab.tsx +++ b/src/components/Themes/ui/ColorsTab/ColorsTab.tsx @@ -1,6 +1,6 @@ import {Flex} from 'landing-uikit'; +import {Trans, useTranslation} from 'next-i18next'; import React from 'react'; -import {Trans, useTranslation} from 'react-i18next'; import {block} from '../../../../utils'; import {useThemeCreator, useThemeCreatorMethods} from '../../hooks'; diff --git a/src/components/Themes/ui/ComponentPreview/ComponentPreview.tsx b/src/components/Themes/ui/ComponentPreview/ComponentPreview.tsx index 1378287d46f3..bc34a622c869 100644 --- a/src/components/Themes/ui/ComponentPreview/ComponentPreview.tsx +++ b/src/components/Themes/ui/ComponentPreview/ComponentPreview.tsx @@ -1,6 +1,6 @@ import {Flex} from 'landing-uikit'; +import {useTranslation} from 'next-i18next'; import React from 'react'; -import {useTranslation} from 'react-i18next'; import {Showcase} from '../../../../blocks/Examples/components/Showcase/Showcase'; import {useThemeCreator} from '../../hooks'; diff --git a/src/components/Themes/ui/ExportThemeSection/ExportThemeSection.tsx b/src/components/Themes/ui/ExportThemeSection/ExportThemeSection.tsx index 55cadae8bbc3..4159fe0f4ba0 100644 --- a/src/components/Themes/ui/ExportThemeSection/ExportThemeSection.tsx +++ b/src/components/Themes/ui/ExportThemeSection/ExportThemeSection.tsx @@ -1,7 +1,7 @@ import {ArrowUpFromSquare} from 'landing-icons'; import {Button, Icon} from 'landing-uikit'; +import {useTranslation} from 'next-i18next'; import React from 'react'; -import {useTranslation} from 'react-i18next'; import {block} from '../../../../utils'; import {ThemeExportDialog} from '../ThemeExportDialog/ThemeExportDialog'; diff --git a/src/components/Themes/ui/MainSettings/MainSettings.tsx b/src/components/Themes/ui/MainSettings/MainSettings.tsx index c4b6e2701435..6c32abcb4d55 100644 --- a/src/components/Themes/ui/MainSettings/MainSettings.tsx +++ b/src/components/Themes/ui/MainSettings/MainSettings.tsx @@ -1,7 +1,7 @@ import {Sliders} from 'landing-icons'; import {Button, Flex, Icon, Text} from 'landing-uikit'; +import {useTranslation} from 'next-i18next'; import React from 'react'; -import {useTranslation} from 'react-i18next'; import {block} from '../../../../utils'; import {SelectableCard} from '../../../SelectableCard/SelectableCard'; diff --git a/src/components/Themes/ui/ThemableSettings/ThemableCard.tsx b/src/components/Themes/ui/ThemableSettings/ThemableCard.tsx index cf065660f3d9..37ba3360cd30 100644 --- a/src/components/Themes/ui/ThemableSettings/ThemableCard.tsx +++ b/src/components/Themes/ui/ThemableSettings/ThemableCard.tsx @@ -1,7 +1,7 @@ import {Moon, Sun} from 'landing-icons'; import {Flex, Icon, Text, ThemeProvider} from 'landing-uikit'; +import {useTranslation} from 'next-i18next'; import React from 'react'; -import {useTranslation} from 'react-i18next'; import {block} from '../../../../utils'; import {useThemeUtilityColor} from '../../hooks'; diff --git a/src/components/Themes/ui/ThemeExportDialog/ThemeExportDialog.tsx b/src/components/Themes/ui/ThemeExportDialog/ThemeExportDialog.tsx index 59e0c67d2b6c..6cf084f6707c 100644 --- a/src/components/Themes/ui/ThemeExportDialog/ThemeExportDialog.tsx +++ b/src/components/Themes/ui/ThemeExportDialog/ThemeExportDialog.tsx @@ -1,6 +1,6 @@ import {Dialog, Flex} from 'landing-uikit'; +import {useTranslation} from 'next-i18next'; import React from 'react'; -import {useTranslation} from 'react-i18next'; import {block} from '../../../../utils'; import {CodeExample} from '../../../CodeExample/CodeExample';