diff --git a/.eslintrc.js b/.eslintrc.js index a3d33b5..a01fb7a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -36,7 +36,7 @@ module.exports = { 'no-unused-vars': 'warn', 'react/require-default-props': 'off', 'react/react-in-jsx-scope': 'off', - 'react/jsx-props-no-spreading': 'warn', + 'react/jsx-props-no-spreading': 'off', 'react/function-component-definition': 'off', 'no-shadow': 'off', 'import/extensions': 'off', @@ -53,6 +53,7 @@ module.exports = { 'react/no-array-index-key': 'off', 'react/jsx-no-useless-fragment': 'off', 'paths-fixes/path-checker': ['error', { alias: '@' }], + 'paths-fixes/public-api-imports': ['error', { alias: '@' }], }, globals: { __IS_DEV__: true, diff --git a/package.json b/package.json index 8f99e25..2bac4c4 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "eslint-plugin-i18next": "^5.1.2", "eslint-plugin-import": "^2.25.4", "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-paths-fixes": "^0.0.2", + "eslint-plugin-paths-fixes": "^0.0.3", "eslint-plugin-react": "^7.29.2", "eslint-plugin-react-hooks": "^4.3.0", "file-loader": "^6.2.0", diff --git a/src/app/providers/StoreProvider/config/StateSchema.ts b/src/app/providers/StoreProvider/config/StateSchema.ts index 56bb2b2..4235964 100644 --- a/src/app/providers/StoreProvider/config/StateSchema.ts +++ b/src/app/providers/StoreProvider/config/StateSchema.ts @@ -11,8 +11,8 @@ import { UserSchema } from '@/entities/User'; import { LoginSchema } from '@/features/AuthByUsername'; import { AddCommentFormSchema } from '@/features/addCommentForm'; import { ArticlesPageSchema } from '@/pages/ArticlesPage'; -import { ScrollRestorationSchema } from '@/features/scrollRestoration/model/types/scrollRestorationSchema'; -import { ArticleDetailsPageSchema } from '@/pages/ArticlesDetailsPage/model/types'; +import { ScrollRestorationSchema } from '@/features/scrollRestoration'; +import { ArticleDetailsPageSchema } from '@/pages/ArticlesDetailsPage'; import { rtkApi } from '@/shared/api/rtkApi'; import { ProfileSchema } from '@/features/editableProfileCard'; import { ArticleDetailsSchema } from '../../../../entities/Article'; diff --git a/src/app/providers/router/ui/AppRouter.tsx b/src/app/providers/router/ui/AppRouter.tsx index 167eaa9..963be97 100644 --- a/src/app/providers/router/ui/AppRouter.tsx +++ b/src/app/providers/router/ui/AppRouter.tsx @@ -4,8 +4,8 @@ import { AppRoutesProps, routeConfig, } from '@/shared/config/routeConfig/routeConfig'; -import { PageLoader } from '@/shared/ui/PageLoader/PageLoader'; import { RequireAuth } from '@/app/providers/router/ui/RequireAuth'; +import { PageLoader } from '@/widgets/PageLoader'; const AppRouter = () => { const renderWithWrapper = useCallback((route: AppRoutesProps) => { diff --git a/src/entities/Article/index.ts b/src/entities/Article/index.ts index a6aebae..bf9d03f 100644 --- a/src/entities/Article/index.ts +++ b/src/entities/Article/index.ts @@ -6,6 +6,6 @@ export { ArticleList } from './ui/ArticleList/ArticleList'; export { ArticleSortSelector } from './ui/ArticleSortSelector/ArticleSortSelector'; export type { Article } from './model/types/article'; -export { ArticleSortField } from './model/consts/consts'; -export { ArticleType } from './model/consts/consts'; -export { ArticleView } from './model/consts/consts'; +export { + ArticleType, ArticleView, ArticleBlockType, ArticleSortField, +} from './model/consts/consts'; diff --git a/src/entities/Article/model/services/fetchArticleById/fetchArticleById.ts b/src/entities/Article/model/services/fetchArticleById/fetchArticleById.ts index 839c44e..fa04ef1 100644 --- a/src/entities/Article/model/services/fetchArticleById/fetchArticleById.ts +++ b/src/entities/Article/model/services/fetchArticleById/fetchArticleById.ts @@ -1,6 +1,5 @@ import { createAsyncThunk } from '@reduxjs/toolkit'; import { ThunkConfig } from '@/app/providers/StoreProvider'; -import { Page } from '@/widgets/Page/Page'; import { Article } from '../../types/article'; export const fetchArticleById = createAsyncThunk< diff --git a/src/entities/Comment/index.ts b/src/entities/Comment/index.ts index 168b667..68bfab5 100644 --- a/src/entities/Comment/index.ts +++ b/src/entities/Comment/index.ts @@ -1,3 +1,3 @@ export { CommentList } from './ui/CommentList/CommentList'; export { CommentCard } from './ui/CommentCard/CommentCard'; -export type { Comment } from './types/comment'; +export type { Comment } from '@/entities/Comment/model/types/comment'; diff --git a/src/entities/Comment/types/comment.ts b/src/entities/Comment/model/types/comment.ts similarity index 100% rename from src/entities/Comment/types/comment.ts rename to src/entities/Comment/model/types/comment.ts diff --git a/src/entities/Comment/ui/CommentCard/CommentCard.tsx b/src/entities/Comment/ui/CommentCard/CommentCard.tsx index b718747..ee1859a 100644 --- a/src/entities/Comment/ui/CommentCard/CommentCard.tsx +++ b/src/entities/Comment/ui/CommentCard/CommentCard.tsx @@ -5,7 +5,7 @@ import { AppLink } from '@/shared/ui/AppLink/AppLink'; import { RoutePath } from '@/shared/config/routeConfig/routeConfig'; import { VStack } from '@/shared/ui/Stack'; import cls from './CommentCard.module.scss'; -import { Comment } from '../../types/comment'; +import { Comment } from '../../model/types/comment'; import { Avatar } from '../../../../shared/ui/Avatar/Avatar'; import { Text } from '../../../../shared/ui/Text/Text'; import { Skeleton } from '../../../../shared/ui/Skeleton/Skeleton'; diff --git a/src/entities/Comment/ui/CommentList/CommentList.tsx b/src/entities/Comment/ui/CommentList/CommentList.tsx index 9359c01..4127a78 100644 --- a/src/entities/Comment/ui/CommentList/CommentList.tsx +++ b/src/entities/Comment/ui/CommentList/CommentList.tsx @@ -4,7 +4,7 @@ import { classNames } from '@/shared/lib/classNames/classNames'; import { VStack } from '@/shared/ui/Stack'; import { Text } from '../../../../shared/ui/Text/Text'; import { CommentCard } from '../CommentCard/CommentCard'; -import { Comment } from '../../types/comment'; +import { Comment } from '../../model/types/comment'; interface CommentListProps { className?: string; diff --git a/src/entities/Notification/index.ts b/src/entities/Notification/index.ts index 8c8eb27..65f7337 100644 --- a/src/entities/Notification/index.ts +++ b/src/entities/Notification/index.ts @@ -1 +1,2 @@ export { NotificationList } from './ui/NotificationList/NotificationList'; +export type { Notification } from './model/types/notification'; diff --git a/src/entities/Profile/model/types/profile.ts b/src/entities/Profile/model/types/profile.ts index 905b09c..009e38a 100644 --- a/src/entities/Profile/model/types/profile.ts +++ b/src/entities/Profile/model/types/profile.ts @@ -1,4 +1,4 @@ -import { Currency } from '@/entities/Currency/model/types/currency'; +import { Currency } from '@/entities/Currency'; import { Country } from '@/entities/Country'; export interface Profile { diff --git a/src/features/AuthByUsername/ui/LoginModal/LoginModal.tsx b/src/features/AuthByUsername/ui/LoginModal/LoginModal.tsx index 76c5ef6..75e7c34 100644 --- a/src/features/AuthByUsername/ui/LoginModal/LoginModal.tsx +++ b/src/features/AuthByUsername/ui/LoginModal/LoginModal.tsx @@ -1,7 +1,7 @@ import { Suspense } from 'react'; import { Modal } from '@/shared/ui/Modal/Modal'; -import { PageLoader } from '@/shared/ui/PageLoader/PageLoader'; import { LoginFormAsync } from '../LoginForm/LoginForm.async'; +import { PageLoader } from '@/widgets/PageLoader'; interface LoginModalProps { className?: string; diff --git a/src/features/notificationButton/ui/NotificationButton/NotificationButton.stories.tsx b/src/features/notificationButton/ui/NotificationButton/NotificationButton.stories.tsx index e5d8087..9da1bfa 100644 --- a/src/features/notificationButton/ui/NotificationButton/NotificationButton.stories.tsx +++ b/src/features/notificationButton/ui/NotificationButton/NotificationButton.stories.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { ComponentMeta, ComponentStory } from '@storybook/react'; import { StoreDecorator } from '@/shared/config/storybook/StoreDecorator/StoreDecorator'; -import { Notification } from '@/entities/Notification/model/types/notification'; +import { Notification } from '@/entities/Notification'; import { NotificationButton } from './NotificationButton'; export default { diff --git a/src/features/scrollRestoration/index.ts b/src/features/scrollRestoration/index.ts index 136b3eb..e29948c 100644 --- a/src/features/scrollRestoration/index.ts +++ b/src/features/scrollRestoration/index.ts @@ -1,3 +1,3 @@ -export type { ScrollSchema } from './model/types/scrollRestorationSchema'; +export type { ScrollSchema, ScrollRestorationSchema } from './model/types/scrollRestorationSchema'; export { getScrollRestorationByPath } from './model/selectors/getscrollRestoration/getScrollRestoration'; export { scrollRestorationReducer, scrollRestorationActions } from './model/slices/scrollRestorationSlice'; diff --git a/src/pages/AdminPanelPage/ui/AdminPanelPage.tsx b/src/pages/AdminPanelPage/ui/AdminPanelPage.tsx index ef472db..0fd74f1 100644 --- a/src/pages/AdminPanelPage/ui/AdminPanelPage.tsx +++ b/src/pages/AdminPanelPage/ui/AdminPanelPage.tsx @@ -1,6 +1,6 @@ import React, { memo } from 'react'; import { useTranslation } from 'react-i18next'; -import { Page } from '@/widgets/Page/Page'; +import { Page } from '@/widgets/Page'; const AdminPanelPage = memo((props: any) => { const { t } = useTranslation(''); diff --git a/src/pages/ArticleEditPage/ui/ArticleEditPage.tsx b/src/pages/ArticleEditPage/ui/ArticleEditPage.tsx index 51d23e0..f71df37 100644 --- a/src/pages/ArticleEditPage/ui/ArticleEditPage.tsx +++ b/src/pages/ArticleEditPage/ui/ArticleEditPage.tsx @@ -1,7 +1,7 @@ import { memo } from 'react'; import { useParams } from 'react-router-dom'; import { classNames } from '@/shared/lib/classNames/classNames'; -import { Page } from '@/widgets/Page/Page'; +import { Page } from '@/widgets/Page'; interface ArticleEditPageProps { className?: string; diff --git a/src/pages/ArticlesDetailsPage/model/types/ArticleDetailsCommentsSchema.ts b/src/pages/ArticlesDetailsPage/model/types/ArticleDetailsCommentsSchema.ts index b7e18c4..3f51093 100644 --- a/src/pages/ArticlesDetailsPage/model/types/ArticleDetailsCommentsSchema.ts +++ b/src/pages/ArticlesDetailsPage/model/types/ArticleDetailsCommentsSchema.ts @@ -1,5 +1,5 @@ import { EntityState } from '@reduxjs/toolkit'; -import { Comment } from '@/entities/Comment/types/comment'; +import { Comment } from '@/entities/Comment'; export interface ArticleDetailsCommentsSchema extends EntityState { isLoading?: boolean; diff --git a/src/pages/ArticlesDetailsPage/ui/ArticlesDetailsPage/ArticlesDetailsPage.tsx b/src/pages/ArticlesDetailsPage/ui/ArticlesDetailsPage/ArticlesDetailsPage.tsx index 58a8a35..d2cca0f 100644 --- a/src/pages/ArticlesDetailsPage/ui/ArticlesDetailsPage/ArticlesDetailsPage.tsx +++ b/src/pages/ArticlesDetailsPage/ui/ArticlesDetailsPage/ArticlesDetailsPage.tsx @@ -4,7 +4,6 @@ import { DynamicModuleLoader, ReducersList, } from '@/shared/lib/components/DynamicModuleLoared/DynamicModuleLoared'; -import { Page } from '@/widgets/Page/Page'; import { VStack } from '@/shared/ui/Stack'; import { ArticleRecommendationsList } from '@/features/articleRecommendationsList'; import { ArticleDetailsComments } from '../../ui/ArticleDetailsComments/ArticleDetailsComments'; @@ -13,6 +12,7 @@ import { ArticlesDetailsPageHeader } from '../../ui/ArticlesDetailsPageHeader/Ar import { articleDetailsPageReducer } from '../../model/slices'; import { ArticleDetails } from '../../../../entities/Article'; import { ArticleRating } from '@/features/articleRating'; +import { Page } from '@/widgets/Page'; const reducers: ReducersList = { articleDetailsPage: articleDetailsPageReducer, diff --git a/src/pages/ArticlesPage/ui/ArticlesPage/ArticlesPage.tsx b/src/pages/ArticlesPage/ui/ArticlesPage/ArticlesPage.tsx index 7d379d8..d27b0ac 100644 --- a/src/pages/ArticlesPage/ui/ArticlesPage/ArticlesPage.tsx +++ b/src/pages/ArticlesPage/ui/ArticlesPage/ArticlesPage.tsx @@ -7,13 +7,13 @@ import { } from '@/shared/lib/components/DynamicModuleLoared/DynamicModuleLoared'; import { useInitialEffect } from '@/shared/lib/hook/useInitialEffect/useInitialEffect'; import { useAppDispatch } from '@/shared/lib/hook/useAppDispatch/useAppDispatch'; -import { Page } from '@/widgets/Page/Page'; import { ArticleInfiniteList } from '../../ui/ArticleInfiniteList/ArticleInfiniteList'; import { ArticlesPageFilters } from '../../ui/ArticlesPageFilters/ArticlesPageFilters'; import { fetchNextArticlePage } from '../../model/services/fetchNextArticlePage/fetchNextArticlePage'; import { initArticlesPage } from '../../model/services/initArticlesPage/initArticlesPage'; import { articlesPageReducer } from '../../model/slices/articlesPageSlice'; import cls from './ArticlesPage.module.scss'; +import { Page } from '@/widgets/Page'; interface ArticlesPageProps { className?: string; diff --git a/src/pages/ForbiddenPage/ui/ForbiddenPage.tsx b/src/pages/ForbiddenPage/ui/ForbiddenPage.tsx index f5267f1..d11e986 100644 --- a/src/pages/ForbiddenPage/ui/ForbiddenPage.tsx +++ b/src/pages/ForbiddenPage/ui/ForbiddenPage.tsx @@ -1,6 +1,6 @@ import React, { memo } from 'react'; import { useTranslation } from 'react-i18next'; -import { Page } from '@/widgets/Page/Page'; +import { Page } from '@/widgets/Page'; const ForbiddenPage = memo((props: any) => { const { t } = useTranslation(''); diff --git a/src/pages/ProfilePage/ui/ProfilePage.tsx b/src/pages/ProfilePage/ui/ProfilePage.tsx index 152df42..36927cf 100644 --- a/src/pages/ProfilePage/ui/ProfilePage.tsx +++ b/src/pages/ProfilePage/ui/ProfilePage.tsx @@ -1,9 +1,9 @@ import { memo } from 'react'; import { useParams } from 'react-router-dom'; import { classNames } from '@/shared/lib/classNames/classNames'; -import { Page } from '@/widgets/Page/Page'; import { VStack } from '@/shared/ui/Stack/VStack/VStack'; import { EditableProfileCard } from '@/features/editableProfileCard'; +import { Page } from '@/widgets/Page'; interface ProfilePageProps { className?: string; diff --git a/src/shared/config/storybook/StoreDecorator/StoreDecorator.tsx b/src/shared/config/storybook/StoreDecorator/StoreDecorator.tsx index 9cbe5f1..b3e7b67 100644 --- a/src/shared/config/storybook/StoreDecorator/StoreDecorator.tsx +++ b/src/shared/config/storybook/StoreDecorator/StoreDecorator.tsx @@ -1,9 +1,13 @@ import { Story } from '@storybook/react'; import { StateSchema, StoreProvider } from '@/app/providers/StoreProvider'; import { loginReducer } from '@/features/AuthByUsername'; +// TODO import { ReducersList } from '@/shared/lib/components/DynamicModuleLoared/DynamicModuleLoared'; +// eslint-disable-next-line paths-fixes/public-api-imports import { addCommentFormReducer } from '@/features/addCommentForm/model/slices/addCommentFormSlice'; +// eslint-disable-next-line paths-fixes/public-api-imports import { articleDetailsPageReducer } from '@/pages/ArticlesDetailsPage/model/slices'; +// eslint-disable-next-line paths-fixes/public-api-imports import { profileReducer } from '@/features/editableProfileCard/model/slice/profileSlice'; import { articleDetailsReducer } from '../../../../entities/Article'; diff --git a/src/shared/ui/PageLoader/PageLoader.module.scss b/src/shared/ui/PageLoader/PageLoader.module.scss deleted file mode 100644 index 3eb1e36..0000000 --- a/src/shared/ui/PageLoader/PageLoader.module.scss +++ /dev/null @@ -1,7 +0,0 @@ -.PageLoader { - // min-height: calc(100vh - var(--navbar-height)); - display: flex; - justify-content: center; - align-items: center; - flex-grow: 1; -} diff --git a/src/shared/ui/PageLoader/PageLoader.tsx b/src/shared/ui/PageLoader/PageLoader.tsx deleted file mode 100644 index 76840af..0000000 --- a/src/shared/ui/PageLoader/PageLoader.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { classNames } from '@/shared/lib/classNames/classNames'; -import { Loader } from '../Loader/Loader'; -import cls from './PageLoader.module.scss'; - -interface PageLoaderProps { - className?: string; -} - -export const PageLoader = ({ className }: PageLoaderProps) => ( -
- -
-); diff --git a/src/widgets/LangSwitcher/LangSwitcher.tsx b/src/widgets/LangSwitcher/LangSwitcher.tsx deleted file mode 100644 index fd06102..0000000 --- a/src/widgets/LangSwitcher/LangSwitcher.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { useTranslation } from 'react-i18next'; -import React from 'react'; -import { classNames } from '@/shared/lib/classNames/classNames'; -import { Button, ButtonTheme } from '@/shared/ui/Button/Button'; - -interface LangSwitcherProps { - className?: string; -} - -export const LangSwitcher = ({ className }: LangSwitcherProps) => { - const { t, i18n } = useTranslation(); - - const toggle = async () => { - i18n.changeLanguage(i18n.language === 'ru' ? 'en' : 'ru'); - }; - - return ( - - ); -}; diff --git a/src/widgets/LangSwitcher/index.ts b/src/widgets/LangSwitcher/index.ts new file mode 100644 index 0000000..48e16a9 --- /dev/null +++ b/src/widgets/LangSwitcher/index.ts @@ -0,0 +1 @@ +export { LangSwitcher } from './ui/LangSwitcher/LangSwitcher'; diff --git a/src/shared/ui/LangSwitcher/LangSwitcher.tsx b/src/widgets/LangSwitcher/ui/LangSwitcher/LangSwitcher.tsx similarity index 78% rename from src/shared/ui/LangSwitcher/LangSwitcher.tsx rename to src/widgets/LangSwitcher/ui/LangSwitcher/LangSwitcher.tsx index 0992861..8e051c5 100644 --- a/src/shared/ui/LangSwitcher/LangSwitcher.tsx +++ b/src/widgets/LangSwitcher/ui/LangSwitcher/LangSwitcher.tsx @@ -1,11 +1,11 @@ import { useTranslation } from 'react-i18next'; import React, { memo } from 'react'; import { classNames } from '@/shared/lib/classNames/classNames'; -import { Button, ButtonTheme } from '../Button/Button'; +import { Button, ButtonTheme } from '@/shared/ui/Button/Button'; interface LangSwitcherProps { - className?: string; - short?: boolean; + className?: string; + short?: boolean; } export const LangSwitcher = memo(({ className, short }: LangSwitcherProps) => { @@ -21,7 +21,7 @@ export const LangSwitcher = memo(({ className, short }: LangSwitcherProps) => { theme={ButtonTheme.CLEAR} onClick={toggle} > - {t(short ? 'Короткий язык' : 'Язык')} + {t(short ? 'EN' : 'English')} ); }); diff --git a/src/widgets/Page/index.ts b/src/widgets/Page/index.ts new file mode 100644 index 0000000..083421d --- /dev/null +++ b/src/widgets/Page/index.ts @@ -0,0 +1 @@ +export { Page, PAGE_ID } from './ui/Page/Page'; diff --git a/src/widgets/Page/Page.module.scss b/src/widgets/Page/ui/Page/Page.module.scss similarity index 100% rename from src/widgets/Page/Page.module.scss rename to src/widgets/Page/ui/Page/Page.module.scss diff --git a/src/widgets/Page/Page.stories.tsx b/src/widgets/Page/ui/Page/Page.stories.tsx similarity index 100% rename from src/widgets/Page/Page.stories.tsx rename to src/widgets/Page/ui/Page/Page.stories.tsx diff --git a/src/widgets/Page/Page.tsx b/src/widgets/Page/ui/Page/Page.tsx similarity index 100% rename from src/widgets/Page/Page.tsx rename to src/widgets/Page/ui/Page/Page.tsx diff --git a/src/widgets/PageError/index.ts b/src/widgets/PageError/index.ts new file mode 100644 index 0000000..32ab1cb --- /dev/null +++ b/src/widgets/PageError/index.ts @@ -0,0 +1 @@ +export { PageError } from './ui/PageError/PageError'; diff --git a/src/widgets/PageError/PageError.module.scss b/src/widgets/PageError/ui/PageError/PageError.module.scss similarity index 100% rename from src/widgets/PageError/PageError.module.scss rename to src/widgets/PageError/ui/PageError/PageError.module.scss diff --git a/src/widgets/PageError/PageError.tsx b/src/widgets/PageError/ui/PageError/PageError.tsx similarity index 100% rename from src/widgets/PageError/PageError.tsx rename to src/widgets/PageError/ui/PageError/PageError.tsx diff --git a/src/widgets/PageLoader/index.ts b/src/widgets/PageLoader/index.ts new file mode 100644 index 0000000..468c001 --- /dev/null +++ b/src/widgets/PageLoader/index.ts @@ -0,0 +1 @@ +export { PageLoader } from './ui/PageLoader/PageLoader'; diff --git a/src/widgets/PageLoader/PageLoader.module.scss b/src/widgets/PageLoader/ui/PageLoader/PageLoader.module.scss similarity index 100% rename from src/widgets/PageLoader/PageLoader.module.scss rename to src/widgets/PageLoader/ui/PageLoader/PageLoader.module.scss index 91ec5b4..cc0d4ee 100644 --- a/src/widgets/PageLoader/PageLoader.module.scss +++ b/src/widgets/PageLoader/ui/PageLoader/PageLoader.module.scss @@ -1,7 +1,7 @@ .PageLoader { min-height: calc(100vh - var(--navbar-height)); display: flex; - align-items: center; justify-content: center; + align-items: center; flex-grow: 1; } diff --git a/src/widgets/PageLoader/PageLoader.tsx b/src/widgets/PageLoader/ui/PageLoader/PageLoader.tsx similarity index 100% rename from src/widgets/PageLoader/PageLoader.tsx rename to src/widgets/PageLoader/ui/PageLoader/PageLoader.tsx diff --git a/src/widgets/Sidebar/ui/Sidebar/Sidebar.tsx b/src/widgets/Sidebar/ui/Sidebar/Sidebar.tsx index 4072f9e..2d41f46 100644 --- a/src/widgets/Sidebar/ui/Sidebar/Sidebar.tsx +++ b/src/widgets/Sidebar/ui/Sidebar/Sidebar.tsx @@ -2,12 +2,12 @@ import { memo, useMemo, useState } from 'react'; import { useSelector } from 'react-redux'; import { classNames } from '@/shared/lib/classNames/classNames'; import { ThemeSwitcher } from '@/shared/ui/ThemeSwitcher'; -import { LangSwitcher } from '@/shared/ui/LangSwitcher/LangSwitcher'; import { Button, ButtonSize, ButtonTheme } from '@/shared/ui/Button/Button'; import { VStack } from '@/shared/ui/Stack/VStack/VStack'; import { getSidebarItems } from '../../model/selectors/getSidebarItems'; import { SidebarItem } from '../SidebarItem/SidebarItem'; import cls from './Sidebar.module.scss'; +import { LangSwitcher } from '@/widgets/LangSwitcher'; interface SidebarProps { className?: string;