From d5c87ceefab006f403a1b379ccd0b8e5c4be3a68 Mon Sep 17 00:00:00 2001 From: Margarita Shumilina Date: Sat, 22 Jun 2024 22:37:54 +0300 Subject: [PATCH] #230-category-fsd --- .../StoreProvider/config/StateSchema.ts | 4 +- .../providers/StoreProvider/config/store.ts | 4 +- .../Carousel/Carousel.module.scss | 6 +-- .../Carousel/Carousel.stories.tsx | 0 .../Carousel/Carousel.tsx | 0 .../ProductAvailability.module.scss | 2 +- .../ProductAvailability.tsx | 0 .../ProductImgCarousel.module.scss | 0 .../ProductImgCarousel.stories.tsx | 0 .../ProductImgCarousel/ProductImgCarousel.tsx | 4 +- .../model/constants/constants.ts | 0 .../model/functions/functions.ts | 0 .../model/types/productImgCarouselType.ts | 0 .../ui/ImgCarousel/ImgCarousel.module.scss | 0 .../ui/ImgCarousel/ImgCarousel.tsx | 5 +-- .../PreviewCarousel.module.scss | 0 .../ui/PreviewCarousel/PreviewCarousel.tsx | 8 ++-- .../WidgetButtonsFunctions.module.scss | 0 .../WidgetButtonsFunctions.stories.tsx | 2 +- .../WidgetButtonsFunctions.tsx | 2 +- .../WidgetButtonsPurchase.module.scss | 1 - .../WidgetButtonsPurchase.stories.tsx | 2 +- .../WidgetButtonsPurchase.tsx | 0 .../CardPreview/CardPreview.module.scss | 2 +- .../ProductItem/CardPreview/CardPreview.tsx | 9 ++-- .../CardPreview/CardPrewiew.stories.tsx | 2 +- .../ProductItem/ProductItem.module.scss | 2 +- .../ProductItem/ProductItem.stories.tsx | 2 +- .../ProductItem/ProductItem.tsx | 10 ++--- .../ProductSkeleton.module.scss | 2 +- .../ProductSkeleton.stories.tsx | 2 +- .../ProductSkeleton/ProductSkeleton.tsx | 0 .../ProductsPage/ProductsPage.module.scss | 12 +++++ src/pages/ProductsPage/ProductsPage.tsx | 44 ++++++++++--------- .../ui}/Dropdown/Dropdown.module.scss | 0 .../ui}/Dropdown/Dropdown.tsx | 2 +- .../ui}/Dropdown/selectors/selectors.tsx | 0 .../ui}/Dropdown/slice/filtersSlice.tsx | 2 +- .../ui}/Dropdown/types/types.ts | 0 .../ui/AccountCartCard/AccountCartCard.tsx | 2 +- .../CategoryListMobilePopup.module.scss | 2 +- .../CategoryListMobilePopup.tsx | 2 +- .../PageControls/PageControls.module.scss | 4 ++ .../PageControls/PageControls.tsx | 4 +- .../PageControlsSkeletons.module.scss | 0 .../PageControlsSkeletons.stories.tsx | 2 +- .../PageControlsSkeletons.tsx | 0 .../PageDescription.module.scss | 2 +- .../PageDescription/PageDescription.tsx | 0 .../PageDescriptionSkeleton.module.scss | 2 +- .../PageDescriptionSkeleton.stories.tsx | 2 +- .../PageDescriptionSkeleton.tsx | 2 +- .../Pagination/Pagination.module.scss | 2 +- .../Pagination/Pagination.tsx | 0 .../Pagination/selectors/selectors.tsx | 0 .../Pagination/slice/paginationSlice.tsx | 2 +- .../Pagination/types/types.ts | 0 src/widgets/Product/Product.tsx | 4 +- src/widgets/Product/ui/PopupImg/PopupImg.tsx | 2 +- src/widgets/ProductsList/ProductsList.tsx | 2 +- .../ViewedProducts/ui/ViewedProducts.tsx | 5 +-- 61 files changed, 92 insertions(+), 80 deletions(-) rename src/{widgets => entities}/Carousel/Carousel.module.scss (80%) rename src/{widgets => entities}/Carousel/Carousel.stories.tsx (100%) rename src/{widgets => entities}/Carousel/Carousel.tsx (100%) rename src/{features => entities}/ProductAvailability/ProductAvailability.module.scss (90%) rename src/{features => entities}/ProductAvailability/ProductAvailability.tsx (100%) rename src/{features => entities}/ProductImgCarousel/ProductImgCarousel.module.scss (100%) rename src/{features => entities}/ProductImgCarousel/ProductImgCarousel.stories.tsx (100%) rename src/{features => entities}/ProductImgCarousel/ProductImgCarousel.tsx (86%) rename src/{features => entities}/ProductImgCarousel/model/constants/constants.ts (100%) rename src/{features => entities}/ProductImgCarousel/model/functions/functions.ts (100%) rename src/{features => entities}/ProductImgCarousel/model/types/productImgCarouselType.ts (100%) rename src/{features => entities}/ProductImgCarousel/ui/ImgCarousel/ImgCarousel.module.scss (100%) rename src/{features => entities}/ProductImgCarousel/ui/ImgCarousel/ImgCarousel.tsx (94%) rename src/{features => entities}/ProductImgCarousel/ui/PreviewCarousel/PreviewCarousel.module.scss (100%) rename src/{features => entities}/ProductImgCarousel/ui/PreviewCarousel/PreviewCarousel.tsx (94%) rename src/{features => entities}/WidgetButtonsFunctions/WidgetButtonsFunctions.module.scss (100%) rename src/{features => entities}/WidgetButtonsFunctions/WidgetButtonsFunctions.stories.tsx (92%) rename src/{features => entities}/WidgetButtonsFunctions/WidgetButtonsFunctions.tsx (97%) rename src/{features => entities}/WidgetButtonsPurchase/WidgetButtonsPurchase.module.scss (97%) rename src/{features => entities}/WidgetButtonsPurchase/WidgetButtonsPurchase.stories.tsx (91%) rename src/{features => entities}/WidgetButtonsPurchase/WidgetButtonsPurchase.tsx (100%) rename src/{widgets => features}/ProductItem/CardPreview/CardPreview.module.scss (94%) rename src/{widgets => features}/ProductItem/CardPreview/CardPreview.tsx (92%) rename src/{widgets => features}/ProductItem/CardPreview/CardPrewiew.stories.tsx (95%) rename src/{widgets => features}/ProductItem/ProductItem.module.scss (97%) rename src/{widgets => features}/ProductItem/ProductItem.stories.tsx (96%) rename src/{widgets => features}/ProductItem/ProductItem.tsx (95%) rename src/{widgets => features}/ProductItem/ProductSkeleton/ProductSkeleton.module.scss (92%) rename src/{widgets => features}/ProductItem/ProductSkeleton/ProductSkeleton.stories.tsx (82%) rename src/{widgets => features}/ProductItem/ProductSkeleton/ProductSkeleton.tsx (100%) rename src/{components => shared/ui}/Dropdown/Dropdown.module.scss (100%) rename src/{components => shared/ui}/Dropdown/Dropdown.tsx (95%) rename src/{components => shared/ui}/Dropdown/selectors/selectors.tsx (100%) rename src/{components => shared/ui}/Dropdown/slice/filtersSlice.tsx (90%) rename src/{components => shared/ui}/Dropdown/types/types.ts (100%) rename src/{entities => widgets/CategoryList}/CategoryListMobilePopup/CategoryListMobilePopup.module.scss (97%) rename src/{entities => widgets/CategoryList}/CategoryListMobilePopup/CategoryListMobilePopup.tsx (93%) rename src/{components => widgets}/PageControls/PageControls.module.scss (92%) rename src/{components => widgets}/PageControls/PageControls.tsx (94%) rename src/{components => widgets}/PageControls/PageControlsSkeletons/PageControlsSkeletons.module.scss (100%) rename src/{components => widgets}/PageControls/PageControlsSkeletons/PageControlsSkeletons.stories.tsx (79%) rename src/{components => widgets}/PageControls/PageControlsSkeletons/PageControlsSkeletons.tsx (100%) rename src/{components => widgets}/PageDescription/PageDescription.module.scss (89%) rename src/{components => widgets}/PageDescription/PageDescription.tsx (100%) rename src/{components => widgets}/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.module.scss (79%) rename src/{components => widgets}/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.stories.tsx (78%) rename src/{components => widgets}/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.tsx (77%) rename src/{components => widgets}/Pagination/Pagination.module.scss (92%) rename src/{components => widgets}/Pagination/Pagination.tsx (100%) rename src/{components => widgets}/Pagination/selectors/selectors.tsx (100%) rename src/{components => widgets}/Pagination/slice/paginationSlice.tsx (84%) rename src/{components => widgets}/Pagination/types/types.ts (100%) diff --git a/src/app/providers/StoreProvider/config/StateSchema.ts b/src/app/providers/StoreProvider/config/StateSchema.ts index c0f84a25..a6a55ed1 100644 --- a/src/app/providers/StoreProvider/config/StateSchema.ts +++ b/src/app/providers/StoreProvider/config/StateSchema.ts @@ -12,12 +12,12 @@ import type { TProductSchema } from '@/pages/ProductPage/model/types/productType import type { CategoryListSchema } from '@/widgets/CategoryGrid/model/types/types' import type { ICategoryProductsSchema } from '@/pages/ProductsPage/types/types' import type { ICategorySchema, IMainCategorySchema } from '@/widgets/CategoryList/types/types' -import type { ICategoryFiltersSchema } from '@/components/Dropdown/types/types' +import type { ICategoryFiltersSchema } from '@/shared/ui/Dropdown/types/types' import type { IFeedbackFormSchema } from '@/widgets/FeedbackForm/model/scheme/feedbackFormSliceSchema' import type { ICartEntitySchema } from '@/entities/CartEntity/model/types/types' import type { IAboutUsSchema } from '@/pages/AboutUsPage/model/types/types' import type { IFeedbackSchema } from '@/features/Reviews/model/types/types' -import type { TNumberOfPageSchema } from '@/components/Pagination/types/types' +import type { TNumberOfPageSchema } from '@/widgets/Pagination/types/types' export interface StateSchema { aboutUs: IAboutUsSchema diff --git a/src/app/providers/StoreProvider/config/store.ts b/src/app/providers/StoreProvider/config/store.ts index 88d5aaaf..665f26b4 100644 --- a/src/app/providers/StoreProvider/config/store.ts +++ b/src/app/providers/StoreProvider/config/store.ts @@ -17,12 +17,12 @@ import { categoryIdSliceReducer } from '@/entities/Category/slice/categoryIdSlic import { categorySlugSliceReducer } from '@/entities/Category/slice/categorySlugSlice' import { categoryBranchesReducer } from '@/widgets/CategoryList/slice/pageCategoryBranchesSlice' import { getCategoriesReducer } from '@/widgets/CategoryList/slice/pageCategoriesSlice' -import { categoryFiltersSliceReducer } from '@/components/Dropdown/slice/filtersSlice' +import { categoryFiltersSliceReducer } from '@/shared/ui/Dropdown/slice/filtersSlice' import { feedbackFormReducer } from '@/widgets/FeedbackForm/model/slice/feedbackFormSlice' import { aboutUsReducer } from '@/pages/AboutUsPage/model/slice/aboutUsSlice' import { cartEntityReducer } from '@/entities/CartEntity/model/slice/cartEntitySlice' import { feedbacksReducer } from '@/features/Reviews/model/slice/feedbacksSlice' -import { paginationSliceReducer } from '@/components/Pagination/slice/paginationSlice' +import { paginationSliceReducer } from '@/widgets/Pagination/slice/paginationSlice' export type RootState = StateSchema diff --git a/src/widgets/Carousel/Carousel.module.scss b/src/entities/Carousel/Carousel.module.scss similarity index 80% rename from src/widgets/Carousel/Carousel.module.scss rename to src/entities/Carousel/Carousel.module.scss index 14f2e05b..eee8fbeb 100644 --- a/src/widgets/Carousel/Carousel.module.scss +++ b/src/entities/Carousel/Carousel.module.scss @@ -1,4 +1,4 @@ -@use '../../shared/styles/utils/variables' as color; +@use '@/shared/styles/utils/variables' as var; .carouselContainer { position: relative; @@ -40,9 +40,9 @@ width: 100%; max-width: 100px; height: 2px; - background-color: color.$body-color-light-grey; + background-color: var.$body-color-light-grey; } .dot.active { - background-color: color.$theme-primary-color; + background-color: var.$theme-primary-color; } diff --git a/src/widgets/Carousel/Carousel.stories.tsx b/src/entities/Carousel/Carousel.stories.tsx similarity index 100% rename from src/widgets/Carousel/Carousel.stories.tsx rename to src/entities/Carousel/Carousel.stories.tsx diff --git a/src/widgets/Carousel/Carousel.tsx b/src/entities/Carousel/Carousel.tsx similarity index 100% rename from src/widgets/Carousel/Carousel.tsx rename to src/entities/Carousel/Carousel.tsx diff --git a/src/features/ProductAvailability/ProductAvailability.module.scss b/src/entities/ProductAvailability/ProductAvailability.module.scss similarity index 90% rename from src/features/ProductAvailability/ProductAvailability.module.scss rename to src/entities/ProductAvailability/ProductAvailability.module.scss index d251ec08..c15deb12 100644 --- a/src/features/ProductAvailability/ProductAvailability.module.scss +++ b/src/entities/ProductAvailability/ProductAvailability.module.scss @@ -1,4 +1,4 @@ -@use '../../shared/styles/utils/variables' as var; +@use '@/shared/styles/utils/variables' as var; .product-card__info { display: flex; diff --git a/src/features/ProductAvailability/ProductAvailability.tsx b/src/entities/ProductAvailability/ProductAvailability.tsx similarity index 100% rename from src/features/ProductAvailability/ProductAvailability.tsx rename to src/entities/ProductAvailability/ProductAvailability.tsx diff --git a/src/features/ProductImgCarousel/ProductImgCarousel.module.scss b/src/entities/ProductImgCarousel/ProductImgCarousel.module.scss similarity index 100% rename from src/features/ProductImgCarousel/ProductImgCarousel.module.scss rename to src/entities/ProductImgCarousel/ProductImgCarousel.module.scss diff --git a/src/features/ProductImgCarousel/ProductImgCarousel.stories.tsx b/src/entities/ProductImgCarousel/ProductImgCarousel.stories.tsx similarity index 100% rename from src/features/ProductImgCarousel/ProductImgCarousel.stories.tsx rename to src/entities/ProductImgCarousel/ProductImgCarousel.stories.tsx diff --git a/src/features/ProductImgCarousel/ProductImgCarousel.tsx b/src/entities/ProductImgCarousel/ProductImgCarousel.tsx similarity index 86% rename from src/features/ProductImgCarousel/ProductImgCarousel.tsx rename to src/entities/ProductImgCarousel/ProductImgCarousel.tsx index 5f465496..6d6905c7 100644 --- a/src/features/ProductImgCarousel/ProductImgCarousel.tsx +++ b/src/entities/ProductImgCarousel/ProductImgCarousel.tsx @@ -1,10 +1,10 @@ import { useState, type FC, Dispatch, SetStateAction } from 'react' +import { ImgCarousel } from '@/entities/ProductImgCarousel/ui/ImgCarousel/ImgCarousel' +import { PreviewCarousel } from '@/entities/ProductImgCarousel/ui/PreviewCarousel/PreviewCarousel' import type { IImage } from '@/shared/model/types/ImageModel' import styles from './ProductImgCarousel.module.scss' -import { ImgCarousel } from './ui/ImgCarousel/ImgCarousel' -import { PreviewCarousel } from './ui/PreviewCarousel/PreviewCarousel' interface IProductImgCarouselProps { imgList: IImage[] diff --git a/src/features/ProductImgCarousel/model/constants/constants.ts b/src/entities/ProductImgCarousel/model/constants/constants.ts similarity index 100% rename from src/features/ProductImgCarousel/model/constants/constants.ts rename to src/entities/ProductImgCarousel/model/constants/constants.ts diff --git a/src/features/ProductImgCarousel/model/functions/functions.ts b/src/entities/ProductImgCarousel/model/functions/functions.ts similarity index 100% rename from src/features/ProductImgCarousel/model/functions/functions.ts rename to src/entities/ProductImgCarousel/model/functions/functions.ts diff --git a/src/features/ProductImgCarousel/model/types/productImgCarouselType.ts b/src/entities/ProductImgCarousel/model/types/productImgCarouselType.ts similarity index 100% rename from src/features/ProductImgCarousel/model/types/productImgCarouselType.ts rename to src/entities/ProductImgCarousel/model/types/productImgCarouselType.ts diff --git a/src/features/ProductImgCarousel/ui/ImgCarousel/ImgCarousel.module.scss b/src/entities/ProductImgCarousel/ui/ImgCarousel/ImgCarousel.module.scss similarity index 100% rename from src/features/ProductImgCarousel/ui/ImgCarousel/ImgCarousel.module.scss rename to src/entities/ProductImgCarousel/ui/ImgCarousel/ImgCarousel.module.scss diff --git a/src/features/ProductImgCarousel/ui/ImgCarousel/ImgCarousel.tsx b/src/entities/ProductImgCarousel/ui/ImgCarousel/ImgCarousel.tsx similarity index 94% rename from src/features/ProductImgCarousel/ui/ImgCarousel/ImgCarousel.tsx rename to src/entities/ProductImgCarousel/ui/ImgCarousel/ImgCarousel.tsx index 1c9e3f37..cfed3e29 100644 --- a/src/features/ProductImgCarousel/ui/ImgCarousel/ImgCarousel.tsx +++ b/src/entities/ProductImgCarousel/ui/ImgCarousel/ImgCarousel.tsx @@ -1,11 +1,10 @@ import React, { FC, useEffect, useMemo, useState } from 'react' +import { IMG_SIZE_PAGE, IMG_SIZE_POPUP } from '@/entities/ProductImgCarousel/model/constants/constants' +import { TImgCarouselProps } from '@/entities/ProductImgCarousel/model/types/productImgCarouselType' import { bodyScrollControl } from '@/shared/libs/helpers/popupHelper' import { useResize } from '@/shared/libs/hooks/useResize' -import { IMG_SIZE_PAGE, IMG_SIZE_POPUP } from '../../model/constants/constants' -import { TImgCarouselProps } from '../../model/types/productImgCarouselType' - import styles from './ImgCarousel.module.scss' /** diff --git a/src/features/ProductImgCarousel/ui/PreviewCarousel/PreviewCarousel.module.scss b/src/entities/ProductImgCarousel/ui/PreviewCarousel/PreviewCarousel.module.scss similarity index 100% rename from src/features/ProductImgCarousel/ui/PreviewCarousel/PreviewCarousel.module.scss rename to src/entities/ProductImgCarousel/ui/PreviewCarousel/PreviewCarousel.module.scss diff --git a/src/features/ProductImgCarousel/ui/PreviewCarousel/PreviewCarousel.tsx b/src/entities/ProductImgCarousel/ui/PreviewCarousel/PreviewCarousel.tsx similarity index 94% rename from src/features/ProductImgCarousel/ui/PreviewCarousel/PreviewCarousel.tsx rename to src/entities/ProductImgCarousel/ui/PreviewCarousel/PreviewCarousel.tsx index 35efac3d..0f8a4f4f 100644 --- a/src/features/ProductImgCarousel/ui/PreviewCarousel/PreviewCarousel.tsx +++ b/src/entities/ProductImgCarousel/ui/PreviewCarousel/PreviewCarousel.tsx @@ -2,13 +2,15 @@ import { type FC, useState, useEffect, useMemo, Dispatch, SetStateAction, MouseE import IconArrowDown from '@/assets/icons/IconArrowDown.svg' import IconArrowUp from '@/assets/icons/IconArrowUp.svg' +import { getDisplayedIndex, slicedImgList } from '@/entities/ProductImgCarousel/model/functions/functions' +import type { + TDisplayedImgList, + TChangeImgArgs +} from '@/entities/ProductImgCarousel/model/types/productImgCarouselType' import type { IImage } from '@/shared/model/types/ImageModel' import { Button, ButtonTheme, ButtonDesign, ButtonSize } from '@/shared/ui/Button/Button' import { DISPLAYED_IMAGES_NUMBER } from '@/widgets/Product/model/constants/constants' -import { getDisplayedIndex, slicedImgList } from '../../model/functions/functions' -import type { TDisplayedImgList, TChangeImgArgs } from '../../model/types/productImgCarouselType' - import styles from './PreviewCarousel.module.scss' interface IPreviewCarouselProps { diff --git a/src/features/WidgetButtonsFunctions/WidgetButtonsFunctions.module.scss b/src/entities/WidgetButtonsFunctions/WidgetButtonsFunctions.module.scss similarity index 100% rename from src/features/WidgetButtonsFunctions/WidgetButtonsFunctions.module.scss rename to src/entities/WidgetButtonsFunctions/WidgetButtonsFunctions.module.scss diff --git a/src/features/WidgetButtonsFunctions/WidgetButtonsFunctions.stories.tsx b/src/entities/WidgetButtonsFunctions/WidgetButtonsFunctions.stories.tsx similarity index 92% rename from src/features/WidgetButtonsFunctions/WidgetButtonsFunctions.stories.tsx rename to src/entities/WidgetButtonsFunctions/WidgetButtonsFunctions.stories.tsx index 3f448eb8..11ab3d5e 100644 --- a/src/features/WidgetButtonsFunctions/WidgetButtonsFunctions.stories.tsx +++ b/src/entities/WidgetButtonsFunctions/WidgetButtonsFunctions.stories.tsx @@ -1,6 +1,6 @@ import { Story, Meta } from '@storybook/react' -import { WidgetButtonsFunctions } from '@/features/WidgetButtonsFunctions/WidgetButtonsFunctions' +import { WidgetButtonsFunctions } from '@/entities/WidgetButtonsFunctions/WidgetButtonsFunctions' import { ECardView } from '@/shared/model/types/common' export default { diff --git a/src/features/WidgetButtonsFunctions/WidgetButtonsFunctions.tsx b/src/entities/WidgetButtonsFunctions/WidgetButtonsFunctions.tsx similarity index 97% rename from src/features/WidgetButtonsFunctions/WidgetButtonsFunctions.tsx rename to src/entities/WidgetButtonsFunctions/WidgetButtonsFunctions.tsx index f8a69472..7fba1a09 100644 --- a/src/features/WidgetButtonsFunctions/WidgetButtonsFunctions.tsx +++ b/src/entities/WidgetButtonsFunctions/WidgetButtonsFunctions.tsx @@ -3,10 +3,10 @@ import { FC } from 'react' import IconCompare from '@/assets/icons/IconCompare.svg' import IconLike from '@/assets/icons/IconLike' +import styles from '@/features/ProductItem/ProductItem.module.scss' import { ECardView } from '@/shared/model/types/common' import { Button, ButtonSize, ButtonTheme } from '@/shared/ui/Button/Button' import { getStylesForCurrentLayout } from '@/shared/ui/ProductLabels/utils/utils' -import styles from '@/widgets/ProductItem/ProductItem.module.scss' import stylesSvg from './WidgetButtonsFunctions.module.scss' diff --git a/src/features/WidgetButtonsPurchase/WidgetButtonsPurchase.module.scss b/src/entities/WidgetButtonsPurchase/WidgetButtonsPurchase.module.scss similarity index 97% rename from src/features/WidgetButtonsPurchase/WidgetButtonsPurchase.module.scss rename to src/entities/WidgetButtonsPurchase/WidgetButtonsPurchase.module.scss index 3f5dca0c..40344247 100644 --- a/src/features/WidgetButtonsPurchase/WidgetButtonsPurchase.module.scss +++ b/src/entities/WidgetButtonsPurchase/WidgetButtonsPurchase.module.scss @@ -9,7 +9,6 @@ .customButton { max-width: 120px; min-height: 50px; - padding: 5px; display: flex; align-items: center; justify-content: center; diff --git a/src/features/WidgetButtonsPurchase/WidgetButtonsPurchase.stories.tsx b/src/entities/WidgetButtonsPurchase/WidgetButtonsPurchase.stories.tsx similarity index 91% rename from src/features/WidgetButtonsPurchase/WidgetButtonsPurchase.stories.tsx rename to src/entities/WidgetButtonsPurchase/WidgetButtonsPurchase.stories.tsx index e59e6c03..bb370e4b 100644 --- a/src/features/WidgetButtonsPurchase/WidgetButtonsPurchase.stories.tsx +++ b/src/entities/WidgetButtonsPurchase/WidgetButtonsPurchase.stories.tsx @@ -1,6 +1,6 @@ import { Story, Meta } from '@storybook/react' -import { WidgetButtonsPurchase } from '@/features/WidgetButtonsPurchase/WidgetButtonsPurchase' +import { WidgetButtonsPurchase } from '@/entities/WidgetButtonsPurchase/WidgetButtonsPurchase' import { ECardView } from '@/shared/model/types/common' export default { diff --git a/src/features/WidgetButtonsPurchase/WidgetButtonsPurchase.tsx b/src/entities/WidgetButtonsPurchase/WidgetButtonsPurchase.tsx similarity index 100% rename from src/features/WidgetButtonsPurchase/WidgetButtonsPurchase.tsx rename to src/entities/WidgetButtonsPurchase/WidgetButtonsPurchase.tsx diff --git a/src/widgets/ProductItem/CardPreview/CardPreview.module.scss b/src/features/ProductItem/CardPreview/CardPreview.module.scss similarity index 94% rename from src/widgets/ProductItem/CardPreview/CardPreview.module.scss rename to src/features/ProductItem/CardPreview/CardPreview.module.scss index b76a7f04..c45a43da 100644 --- a/src/widgets/ProductItem/CardPreview/CardPreview.module.scss +++ b/src/features/ProductItem/CardPreview/CardPreview.module.scss @@ -1,4 +1,4 @@ -@use '../../../shared/styles/utils/variables' as var; +@use '@/shared/styles/utils/variables' as var; .modal-card { margin: 0 50px; diff --git a/src/widgets/ProductItem/CardPreview/CardPreview.tsx b/src/features/ProductItem/CardPreview/CardPreview.tsx similarity index 92% rename from src/widgets/ProductItem/CardPreview/CardPreview.tsx rename to src/features/ProductItem/CardPreview/CardPreview.tsx index e2c9a5ba..4e752798 100644 --- a/src/widgets/ProductItem/CardPreview/CardPreview.tsx +++ b/src/features/ProductItem/CardPreview/CardPreview.tsx @@ -4,10 +4,10 @@ import { useNavigate } from 'react-router-dom' import IconCart from '@/assets/icons/IconCart.svg' import { useProductInCart } from '@/entities/CartEntity/model/hooks/cartHooks' import { useWithFavorite } from '@/entities/Favorite/model/hooks/useWithFavorie' +import { ProductAvailability } from '@/entities/ProductAvailability/ProductAvailability' +import { ProductImgCarousel } from '@/entities/ProductImgCarousel/ProductImgCarousel' import { CardPreviewFooter } from '@/features/CardPreviewFooter/CardPreviewFooter' import { CardPreviewHeader } from '@/features/CardPreviewHeader/CardPreviewHeader' -import { ProductAvailability } from '@/features/ProductAvailability/ProductAvailability' -import { ProductImgCarousel } from '@/features/ProductImgCarousel/ProductImgCarousel' import { Routes } from '@/shared/config/routerConfig/routes' import { IProduct } from '@/shared/model/types/ProductModel' import { Button, ButtonSize, ButtonTheme } from '@/shared/ui/Button/Button' @@ -18,7 +18,7 @@ import { PopupImg } from '@/widgets/Product/ui/PopupImg/PopupImg' import styles from './CardPreview.module.scss' -const LazyQuickPurchaseForm = lazy(() => import('@/features/QuickPurchase/index')) +const LazyQuickPurchaseForm = lazy(() => import('@/features/QuickPurchase')) type TProps = | 'name' @@ -118,9 +118,6 @@ export const CardPreview: FC = ({
{showPopup && } - {/* /!* @TODO: Добавить компонент для фотографии товара*/} - {/*https://github.com/Studio-Yandex-Practicum/maxboom_frontend/issues/41 *!/*/} - {/* {name}*/}
{ return ( diff --git a/src/widgets/ProductItem/ProductSkeleton/ProductSkeleton.tsx b/src/features/ProductItem/ProductSkeleton/ProductSkeleton.tsx similarity index 100% rename from src/widgets/ProductItem/ProductSkeleton/ProductSkeleton.tsx rename to src/features/ProductItem/ProductSkeleton/ProductSkeleton.tsx diff --git a/src/pages/ProductsPage/ProductsPage.module.scss b/src/pages/ProductsPage/ProductsPage.module.scss index bf2196b4..7639fac7 100644 --- a/src/pages/ProductsPage/ProductsPage.module.scss +++ b/src/pages/ProductsPage/ProductsPage.module.scss @@ -34,3 +34,15 @@ display: none; } } + +.mobile-page-controls{ + display: flex; + width: 100%; + align-items: end; + + @include media.respond-to('middle') { + flex-direction: column; + align-items: flex-start; + gap: 10px; + } +} diff --git a/src/pages/ProductsPage/ProductsPage.tsx b/src/pages/ProductsPage/ProductsPage.tsx index 5c6eb1a8..fa0a3362 100644 --- a/src/pages/ProductsPage/ProductsPage.tsx +++ b/src/pages/ProductsPage/ProductsPage.tsx @@ -4,17 +4,9 @@ import { useSelector } from 'react-redux' import { useLocation } from 'react-router' import { useNavigate } from 'react-router-dom' -import { selectFilterProducts, selectFilterQuantity } from '@/components/Dropdown/selectors/selectors' -import { setFilterProducts, setProductQuantityFilter } from '@/components/Dropdown/slice/filtersSlice' -import { PageControls } from '@/components/PageControls/PageControls' -import { PageControlsSkeletons } from '@/components/PageControls/PageControlsSkeletons/PageControlsSkeletons' -import { PageDescription } from '@/components/PageDescription/PageDescription' -import { PageDescriptionSkeleton } from '@/components/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton' -import { Pagination } from '@/components/Pagination/Pagination' -import { selectNumberOfPage } from '@/components/Pagination/selectors/selectors' -import { setNumberOfPage } from '@/components/Pagination/slice/paginationSlice' import { selectCategoryId, selectCategorySlug } from '@/entities/Category/selectors/categorySelectors' import { setCategoryId } from '@/entities/Category/slice/categoryIdSlice' +import { ProductSkeleton } from '@/features/ProductItem/ProductSkeleton/ProductSkeleton' import { getLoading, getProductsOfCategorySelector } from '@/pages/ProductsPage/selectors/selectors' import { getProducts } from '@/pages/ProductsPage/services/getProducts' import { ITEMS_PER_PAGE_OPTION, NUMBER_OF_PRODUCTS, SORT_OPTION } from '@/shared/constants/constants' @@ -23,9 +15,18 @@ import { totalPagesHandler } from '@/shared/libs/helpers/totalPagesHandler' import { useAppDispatch } from '@/shared/libs/hooks/store' import { useReplaceValueFromLocation } from '@/shared/libs/hooks/useReplaceValueFromLocation' import { ECardView } from '@/shared/model/types/common' +import { selectFilterProducts, selectFilterQuantity } from '@/shared/ui/Dropdown/selectors/selectors' +import { setFilterProducts, setProductQuantityFilter } from '@/shared/ui/Dropdown/slice/filtersSlice' import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import { CategoryList } from '@/widgets/CategoryList/CategoryList' -import { ProductSkeleton } from '@/widgets/ProductItem/ProductSkeleton/ProductSkeleton' +import { CategoryListMobilePopup } from '@/widgets/CategoryList/CategoryListMobilePopup/CategoryListMobilePopup' +import { PageControls } from '@/widgets/PageControls/PageControls' +import { PageControlsSkeletons } from '@/widgets/PageControls/PageControlsSkeletons/PageControlsSkeletons' +import { PageDescription } from '@/widgets/PageDescription/PageDescription' +import { PageDescriptionSkeleton } from '@/widgets/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton' +import { Pagination } from '@/widgets/Pagination/Pagination' +import { selectNumberOfPage } from '@/widgets/Pagination/selectors/selectors' +import { setNumberOfPage } from '@/widgets/Pagination/slice/paginationSlice' import { ProductsList } from '@/widgets/ProductsList/ProductsList' import styles from './ProductsPage.module.scss' @@ -164,16 +165,19 @@ export const ProductsPage = () => { ) : categoriesProducts.results.length > 0 ? ( <> - +
+ + +
) : ( diff --git a/src/components/Dropdown/Dropdown.module.scss b/src/shared/ui/Dropdown/Dropdown.module.scss similarity index 100% rename from src/components/Dropdown/Dropdown.module.scss rename to src/shared/ui/Dropdown/Dropdown.module.scss diff --git a/src/components/Dropdown/Dropdown.tsx b/src/shared/ui/Dropdown/Dropdown.tsx similarity index 95% rename from src/components/Dropdown/Dropdown.tsx rename to src/shared/ui/Dropdown/Dropdown.tsx index b55b2937..e6b1c1a7 100644 --- a/src/components/Dropdown/Dropdown.tsx +++ b/src/shared/ui/Dropdown/Dropdown.tsx @@ -1,6 +1,6 @@ import React, { ChangeEvent, useState } from 'react' -import type { TSortOptions } from '@/components/PageControls/PageControls' +import type { TSortOptions } from '@/widgets/PageControls/PageControls' import styles from './Dropdown.module.scss' diff --git a/src/components/Dropdown/selectors/selectors.tsx b/src/shared/ui/Dropdown/selectors/selectors.tsx similarity index 100% rename from src/components/Dropdown/selectors/selectors.tsx rename to src/shared/ui/Dropdown/selectors/selectors.tsx diff --git a/src/components/Dropdown/slice/filtersSlice.tsx b/src/shared/ui/Dropdown/slice/filtersSlice.tsx similarity index 90% rename from src/components/Dropdown/slice/filtersSlice.tsx rename to src/shared/ui/Dropdown/slice/filtersSlice.tsx index 688a2977..e7a7e1ad 100644 --- a/src/components/Dropdown/slice/filtersSlice.tsx +++ b/src/shared/ui/Dropdown/slice/filtersSlice.tsx @@ -1,7 +1,7 @@ import { createSlice } from '@reduxjs/toolkit' -import type { ICategoryFiltersSchema } from '@/components/Dropdown/types/types' import { SORT_NAMES, SORT_VALUES } from '@/shared/constants/constants' +import type { ICategoryFiltersSchema } from '@/shared/ui/Dropdown/types/types' const initialState: ICategoryFiltersSchema = { filterProducts: { name: SORT_NAMES.NAMES_A_YA, value: SORT_VALUES.NAMES_A_YA }, diff --git a/src/components/Dropdown/types/types.ts b/src/shared/ui/Dropdown/types/types.ts similarity index 100% rename from src/components/Dropdown/types/types.ts rename to src/shared/ui/Dropdown/types/types.ts diff --git a/src/widgets/AccountCart/ui/AccountCartCard/AccountCartCard.tsx b/src/widgets/AccountCart/ui/AccountCartCard/AccountCartCard.tsx index feb522d5..6490bbc1 100644 --- a/src/widgets/AccountCart/ui/AccountCartCard/AccountCartCard.tsx +++ b/src/widgets/AccountCart/ui/AccountCartCard/AccountCartCard.tsx @@ -1,7 +1,7 @@ import { FC, useState } from 'react' import { useWithFavorite } from '@/entities/Favorite/model/hooks/useWithFavorie' -import { WidgetButtonsFunctions } from '@/features/WidgetButtonsFunctions/WidgetButtonsFunctions' +import { WidgetButtonsFunctions } from '@/entities/WidgetButtonsFunctions/WidgetButtonsFunctions' import { Routes } from '@/shared/config/routerConfig/routes' import { ECardView } from '@/shared/model/types/common' import { IProduct } from '@/shared/model/types/ProductModel' diff --git a/src/entities/CategoryListMobilePopup/CategoryListMobilePopup.module.scss b/src/widgets/CategoryList/CategoryListMobilePopup/CategoryListMobilePopup.module.scss similarity index 97% rename from src/entities/CategoryListMobilePopup/CategoryListMobilePopup.module.scss rename to src/widgets/CategoryList/CategoryListMobilePopup/CategoryListMobilePopup.module.scss index 2d2e5556..4d60d98e 100644 --- a/src/entities/CategoryListMobilePopup/CategoryListMobilePopup.module.scss +++ b/src/widgets/CategoryList/CategoryListMobilePopup/CategoryListMobilePopup.module.scss @@ -16,7 +16,7 @@ @include media.respond-to('large') { display: flex; - max-width: 310px; + width: 310px; } } diff --git a/src/entities/CategoryListMobilePopup/CategoryListMobilePopup.tsx b/src/widgets/CategoryList/CategoryListMobilePopup/CategoryListMobilePopup.tsx similarity index 93% rename from src/entities/CategoryListMobilePopup/CategoryListMobilePopup.tsx rename to src/widgets/CategoryList/CategoryListMobilePopup/CategoryListMobilePopup.tsx index e7424120..ff928e43 100644 --- a/src/entities/CategoryListMobilePopup/CategoryListMobilePopup.tsx +++ b/src/widgets/CategoryList/CategoryListMobilePopup/CategoryListMobilePopup.tsx @@ -1,10 +1,10 @@ import { type FC, useState } from 'react' -import styles from '@/entities/CategoryListMobilePopup/CategoryListMobilePopup.module.scss' import MobileMenuIcon from '@/shared/icons/MobileMenuIcon.svg' import { Button, ButtonSize, ButtonTheme } from '@/shared/ui/Button/Button' import Modal from '@/shared/ui/Modal/Modal' import { CategoryList } from '@/widgets/CategoryList/CategoryList' +import styles from '@/widgets/CategoryList/CategoryListMobilePopup/CategoryListMobilePopup.module.scss' export const CategoryListMobilePopup: FC = () => { const [isModalOpen, setIsModalOpen] = useState(false) diff --git a/src/components/PageControls/PageControls.module.scss b/src/widgets/PageControls/PageControls.module.scss similarity index 92% rename from src/components/PageControls/PageControls.module.scss rename to src/widgets/PageControls/PageControls.module.scss index f7c244ff..d9a24c44 100644 --- a/src/components/PageControls/PageControls.module.scss +++ b/src/widgets/PageControls/PageControls.module.scss @@ -7,6 +7,10 @@ justify-content: space-between; gap: 10px; + @include media.respond-to('large') { + justify-content: end; + } + @include media.respond-to('middle') { flex-direction: column; } diff --git a/src/components/PageControls/PageControls.tsx b/src/widgets/PageControls/PageControls.tsx similarity index 94% rename from src/components/PageControls/PageControls.tsx rename to src/widgets/PageControls/PageControls.tsx index 0e8d6a9a..a3d1e382 100644 --- a/src/components/PageControls/PageControls.tsx +++ b/src/widgets/PageControls/PageControls.tsx @@ -3,9 +3,8 @@ import { ChangeEventHandler, FC } from 'react' import IconCompact from '@/assets/icons/IconCompact.svg' import IconGrid from '@/assets/icons/IconGrid.svg' import IconList from '@/assets/icons/IconList.svg' -import { Dropdown } from '@/components/Dropdown/Dropdown' -import { CategoryListMobilePopup } from '@/entities/CategoryListMobilePopup/CategoryListMobilePopup' import { ECardView } from '@/shared/model/types/common' +import { Dropdown } from '@/shared/ui/Dropdown/Dropdown' import styles from './PageControls.module.scss' @@ -48,7 +47,6 @@ export const PageControls: FC = ({ }) => { return (
-
{ return ( diff --git a/src/components/PageControls/PageControlsSkeletons/PageControlsSkeletons.tsx b/src/widgets/PageControls/PageControlsSkeletons/PageControlsSkeletons.tsx similarity index 100% rename from src/components/PageControls/PageControlsSkeletons/PageControlsSkeletons.tsx rename to src/widgets/PageControls/PageControlsSkeletons/PageControlsSkeletons.tsx diff --git a/src/components/PageDescription/PageDescription.module.scss b/src/widgets/PageDescription/PageDescription.module.scss similarity index 89% rename from src/components/PageDescription/PageDescription.module.scss rename to src/widgets/PageDescription/PageDescription.module.scss index cdf37807..bd857d33 100644 --- a/src/components/PageDescription/PageDescription.module.scss +++ b/src/widgets/PageDescription/PageDescription.module.scss @@ -1,4 +1,4 @@ -@use '../../shared/styles/utils/variables' as var; +@use '@/shared/styles/utils/variables' as var; .content__description { display: flex; diff --git a/src/components/PageDescription/PageDescription.tsx b/src/widgets/PageDescription/PageDescription.tsx similarity index 100% rename from src/components/PageDescription/PageDescription.tsx rename to src/widgets/PageDescription/PageDescription.tsx diff --git a/src/components/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.module.scss b/src/widgets/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.module.scss similarity index 79% rename from src/components/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.module.scss rename to src/widgets/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.module.scss index 61a7cd45..ee22f575 100644 --- a/src/components/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.module.scss +++ b/src/widgets/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.module.scss @@ -1,4 +1,4 @@ -@use '../../../shared/styles/utils/variables' as var; +@use '@/shared/styles/utils/variables' as var; .sk-content { width: 330px; diff --git a/src/components/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.stories.tsx b/src/widgets/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.stories.tsx similarity index 78% rename from src/components/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.stories.tsx rename to src/widgets/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.stories.tsx index ea2a2d68..6dcf858c 100644 --- a/src/components/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.stories.tsx +++ b/src/widgets/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.stories.tsx @@ -1,7 +1,7 @@ import { Meta, StoryObj } from '@storybook/react' import { type FC } from 'react' -import { PageDescriptionSkeleton } from '@/components/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton' +import { PageDescriptionSkeleton } from '@/widgets/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton' const StorybookWrapper: FC = () => { return ( diff --git a/src/components/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.tsx b/src/widgets/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.tsx similarity index 77% rename from src/components/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.tsx rename to src/widgets/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.tsx index 9de55a5e..01b605cf 100644 --- a/src/components/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.tsx +++ b/src/widgets/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.tsx @@ -1,7 +1,7 @@ import { type FC } from 'react' import Skeleton from 'react-loading-skeleton' -import styles from '@/components/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.module.scss' +import styles from '@/widgets/PageDescription/PageDescriptionSkeleton/PageDescriptionSkeleton.module.scss' export const PageDescriptionSkeleton: FC = () => { return ( diff --git a/src/components/Pagination/Pagination.module.scss b/src/widgets/Pagination/Pagination.module.scss similarity index 92% rename from src/components/Pagination/Pagination.module.scss rename to src/widgets/Pagination/Pagination.module.scss index a6698272..9de33192 100644 --- a/src/components/Pagination/Pagination.module.scss +++ b/src/widgets/Pagination/Pagination.module.scss @@ -1,4 +1,4 @@ -@use '../../shared/styles/utils/variables' as var; +@use '@/shared/styles/utils/variables' as var; .pagination { display: flex; diff --git a/src/components/Pagination/Pagination.tsx b/src/widgets/Pagination/Pagination.tsx similarity index 100% rename from src/components/Pagination/Pagination.tsx rename to src/widgets/Pagination/Pagination.tsx diff --git a/src/components/Pagination/selectors/selectors.tsx b/src/widgets/Pagination/selectors/selectors.tsx similarity index 100% rename from src/components/Pagination/selectors/selectors.tsx rename to src/widgets/Pagination/selectors/selectors.tsx diff --git a/src/components/Pagination/slice/paginationSlice.tsx b/src/widgets/Pagination/slice/paginationSlice.tsx similarity index 84% rename from src/components/Pagination/slice/paginationSlice.tsx rename to src/widgets/Pagination/slice/paginationSlice.tsx index 7461998e..ab999bb4 100644 --- a/src/components/Pagination/slice/paginationSlice.tsx +++ b/src/widgets/Pagination/slice/paginationSlice.tsx @@ -1,6 +1,6 @@ import { createSlice } from '@reduxjs/toolkit' -import type { TNumberOfPageSchema } from '@/components/Pagination/types/types' +import type { TNumberOfPageSchema } from '@/widgets/Pagination/types/types' const initialState: TNumberOfPageSchema = { numberOfPage: 1 diff --git a/src/components/Pagination/types/types.ts b/src/widgets/Pagination/types/types.ts similarity index 100% rename from src/components/Pagination/types/types.ts rename to src/widgets/Pagination/types/types.ts diff --git a/src/widgets/Product/Product.tsx b/src/widgets/Product/Product.tsx index 1790fb9a..5ec98be5 100644 --- a/src/widgets/Product/Product.tsx +++ b/src/widgets/Product/Product.tsx @@ -3,9 +3,9 @@ import { type FC, useState } from 'react' import IconCart from '@/assets/icons/IconCart.svg' import { useProductInCart } from '@/entities/CartEntity/model/hooks/cartHooks' import { useWithFavorite } from '@/entities/Favorite/model/hooks/useWithFavorie' +import { ProductAvailability } from '@/entities/ProductAvailability/ProductAvailability' +import { ProductImgCarousel } from '@/entities/ProductImgCarousel/ProductImgCarousel' import { CardPreviewHeader } from '@/features/CardPreviewHeader/CardPreviewHeader' -import { ProductAvailability } from '@/features/ProductAvailability/ProductAvailability' -import { ProductImgCarousel } from '@/features/ProductImgCarousel/ProductImgCarousel' import type { IProduct } from '@/shared/model/types/ProductModel' import { Button, ButtonSize, ButtonTheme } from '@/shared/ui/Button/Button' import Paragraph from '@/shared/ui/Paragraph/Paragraph' diff --git a/src/widgets/Product/ui/PopupImg/PopupImg.tsx b/src/widgets/Product/ui/PopupImg/PopupImg.tsx index 8ee60004..270117e1 100644 --- a/src/widgets/Product/ui/PopupImg/PopupImg.tsx +++ b/src/widgets/Product/ui/PopupImg/PopupImg.tsx @@ -1,6 +1,6 @@ import { type FC, useMemo, useState } from 'react' -import { ImgCarousel } from '@/features/ProductImgCarousel/ui/ImgCarousel/ImgCarousel' +import { ImgCarousel } from '@/entities/ProductImgCarousel/ui/ImgCarousel/ImgCarousel' import { bodyScrollControl } from '@/shared/libs/helpers/popupHelper' import type { TPopupImgProps } from '../../model/types/productTypes' diff --git a/src/widgets/ProductsList/ProductsList.tsx b/src/widgets/ProductsList/ProductsList.tsx index dbdc1457..8b670f5e 100644 --- a/src/widgets/ProductsList/ProductsList.tsx +++ b/src/widgets/ProductsList/ProductsList.tsx @@ -1,9 +1,9 @@ import type { FC } from 'react' +import { ProductItem } from '@/features/ProductItem/ProductItem' import type { ProductsInfo } from '@/pages/ProductsPage/types/types' import { ECardView } from '@/shared/model/types/common' import type { IImage } from '@/shared/model/types/ImageModel' -import { ProductItem } from '@/widgets/ProductItem/ProductItem' type TProps = { items: ProductsInfo diff --git a/src/widgets/ViewedProducts/ui/ViewedProducts.tsx b/src/widgets/ViewedProducts/ui/ViewedProducts.tsx index 7f663cc7..4492d978 100644 --- a/src/widgets/ViewedProducts/ui/ViewedProducts.tsx +++ b/src/widgets/ViewedProducts/ui/ViewedProducts.tsx @@ -1,10 +1,10 @@ import { FC } from 'react' +import { ProductItem } from '@/features/ProductItem/ProductItem' import { VIEWED_PRODUCTS_COUNT_ON_MAIN } from '@/shared/constants/constants' import { ECardView } from '@/shared/model/types/common' import Heading from '@/shared/ui/Heading/Heading' import Scroll from '@/shared/ui/Scroll/Scroll' -import { ProductItem } from '@/widgets/ProductItem/ProductItem' import { getViewedProductsFromStorage } from '../model/functions/functions' @@ -24,9 +24,6 @@ interface IViewedProductsProps { const ViewedProducts: FC = ({ title, hasLabel }) => { const viewedProducts = getViewedProductsFromStorage() - { - /*TODO по FSD нельзя использовать widget ProductItem в widget, нужно перенести ProductItem в features или entities*/ - } const productList = viewedProducts.map((item, index) => { if (hasLabel && index > VIEWED_PRODUCTS_COUNT_ON_MAIN) return