Skip to content

Commit

Permalink
Fix i18n hydration errors (#245)
Browse files Browse the repository at this point in the history
Co-authored-by: dgaponov <[email protected]>
  • Loading branch information
imsitnikov and dgaponov authored Aug 7, 2024
1 parent ec70473 commit c737542
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/Themes/ui/BasicPalette/AddColorButton.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
2 changes: 1 addition & 1 deletion src/components/Themes/ui/BasicPalette/BasicPalette.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion src/components/Themes/ui/ColorsTab/ColorsTab.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Flex} from 'landing-uikit';
import {useTranslation} from 'next-i18next';

Check failure on line 2 in src/components/Themes/ui/ComponentPreview/ComponentPreview.tsx

View workflow job for this annotation

GitHub Actions / Verify Files

'useTranslation' is defined but never used. Allowed unused vars must match /^_/u
import dynamic from 'next/dynamic';
import React from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Themes/ui/MainSettings/MainSettings.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Themes/ui/ThemableSettings/ThemableCard.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down

0 comments on commit c737542

Please sign in to comment.