diff --git a/src/app/router/AppRouter/ui/AppRouter.tsx b/src/app/router/AppRouter/ui/AppRouter.tsx index d0deae46..5af2e528 100644 --- a/src/app/router/AppRouter/ui/AppRouter.tsx +++ b/src/app/router/AppRouter/ui/AppRouter.tsx @@ -17,10 +17,13 @@ import HelpPage from '@/pages/HelpPage/HelpPage' import LoginPage from '@/pages/LoginPage/LoginPage' import { LogoutPage } from '@/pages/LogoutPage/LogoutPage' import MainPage from '@/pages/MainPage/MainPage' +import { PrivacyPage } from '@/pages/PrivacyPage/PrivacyPage' import { ProductPage } from '@/pages/ProductPage/ProductPage' import { ProductsPage } from '@/pages/ProductsPage/ProductsPage' +import { ReviewsPage } from '@/pages/ReviewsPage/ReviewsPage' import RootPage from '@/pages/RootPage/RootPage' import SearchResultsPage from '@/pages/SearchResultsPage/SearchResultsPage' +import { TermsPage } from '@/pages/TermsPage/TermsPage' import VouchersPage from '@/pages/VouchersPage/VouchersPage' import { Routes } from '@/shared/config/routerConfig/routes' @@ -82,7 +85,7 @@ export const AppRouter = createBrowserRouter([ }, { path: Routes.PRIVACY, - element: // временная заглушка нужна страница с политикой безопасности + element: }, { path: Routes.PRODUCTS, @@ -93,9 +96,13 @@ export const AppRouter = createBrowserRouter([ element: }, { - path: Routes.REVIEWS + '/:index', + path: Routes.FEEDBACKS + '/:index', element: }, + { + path: Routes.REVIEWS, + element: + }, { path: Routes.SEARCH, element: @@ -106,7 +113,7 @@ export const AppRouter = createBrowserRouter([ }, { path: Routes.TERMS, - element: // временная заглушка нужна страница с условиями соглашения + element: }, { path: Routes.ADD_RETURN, diff --git a/src/components/BlogMain/BlogMain.tsx b/src/components/BlogMain/BlogMain.tsx index 4dc261f4..1ead36a2 100644 --- a/src/components/BlogMain/BlogMain.tsx +++ b/src/components/BlogMain/BlogMain.tsx @@ -3,13 +3,13 @@ import { FC, useState } from 'react' import type { PropsBlog } from '@/models/PropsBlog' import Heading from '@/shared/ui/Heading/Heading' import Subheading from '@/shared/ui/Subheading/Subheading' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import BlogCategories from '../BlogCategories/BlogCategories' import BlogItemForContainer from '../BlogItemForContainer/BlogItemForContainer' import BlogMainItem from '../BlogMainItem/BlogMainItem' import BlogTags from '../BlogTags/BlogTags' import { Pagination } from '../Pagination/Pagination' -import WrapperForMainContent from '../WrapperForMainContent/WrapperForMainContent' import styles from './blog-main.module.scss' diff --git a/src/entities/ReviewCard/ui/ReviewCardFeedback/ReviewCardFeedback.tsx b/src/entities/ReviewCard/ui/ReviewCardFeedback/ReviewCardFeedback.tsx index 449f0b77..d628ba70 100644 --- a/src/entities/ReviewCard/ui/ReviewCardFeedback/ReviewCardFeedback.tsx +++ b/src/entities/ReviewCard/ui/ReviewCardFeedback/ReviewCardFeedback.tsx @@ -55,7 +55,7 @@ export const ReviewCardFeedback: FC = ({ pk, text, sco {text} {newDate} - + Читать полный отзыв diff --git a/src/entities/ReviewCard/ui/ReviewCardStore/ReviewCardStore.tsx b/src/entities/ReviewCard/ui/ReviewCardStore/ReviewCardStore.tsx index d6b1f7cc..5ace4ab6 100644 --- a/src/entities/ReviewCard/ui/ReviewCardStore/ReviewCardStore.tsx +++ b/src/entities/ReviewCard/ui/ReviewCardStore/ReviewCardStore.tsx @@ -29,7 +29,7 @@ export const ReviewCardStore: FC = ({ score }) => { {FEEDBACK_STORE_COMMENT} Вы можете  - + оставить отзыв   о нашем магазине или  diff --git a/src/mockData/headerMenuData.ts b/src/mockData/headerMenuData.ts index dafcda69..4edeaf1a 100644 --- a/src/mockData/headerMenuData.ts +++ b/src/mockData/headerMenuData.ts @@ -21,7 +21,7 @@ export const headerMenuData = [ }, { title: 'Отзывы о магазине', - link: Routes.REVIEWS + link: Routes.FEEDBACKS }, { title: 'Контакты', diff --git a/src/pages/AboutUsPage/AboutUsPage.tsx b/src/pages/AboutUsPage/AboutUsPage.tsx index 375d4288..75e68940 100644 --- a/src/pages/AboutUsPage/AboutUsPage.tsx +++ b/src/pages/AboutUsPage/AboutUsPage.tsx @@ -1,11 +1,11 @@ import { useEffect } from 'react' import { useSelector } from 'react-redux' -import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperForMainContent' import AboutUs from '@/entities/AboutUs' import { useAppDispatch } from '@/shared/libs/hooks/store' import Breadcrumbs from '@/shared/ui/Breadcrumbs/Breadcrumbs' import Heading, { HeadingType } from '@/shared/ui/Heading/Heading' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import styles from './AboutUsPage.module.scss' import { getAboutUsSelector } from './model/selectors/selectors' diff --git a/src/pages/AccountPage/AccountPage.tsx b/src/pages/AccountPage/AccountPage.tsx index 24f51d56..2230058d 100644 --- a/src/pages/AccountPage/AccountPage.tsx +++ b/src/pages/AccountPage/AccountPage.tsx @@ -1,12 +1,12 @@ import { type FC, Suspense, useState } from 'react' -import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperForMainContent' import SideBarMenuModal from '@/features/SideBarMenuModal' import { useResize } from '@/shared/libs/hooks/useResize' import Breadcrumbs from '@/shared/ui/Breadcrumbs/Breadcrumbs' import Heading from '@/shared/ui/Heading/Heading' import Modal from '@/shared/ui/Modal/Modal' import Spinner from '@/shared/ui/Spinner/Spinner' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import { AccountCart } from '@/widgets/AccountCart/AccountCart' import { AccountMenu } from '@/widgets/AccountMenu/AccountMenu' import { AccountSubscribe } from '@/widgets/AccountSubscribe/AccountSubscribe' diff --git a/src/pages/BlogPage/BlogPage.tsx b/src/pages/BlogPage/BlogPage.tsx index 719678db..95529a2a 100644 --- a/src/pages/BlogPage/BlogPage.tsx +++ b/src/pages/BlogPage/BlogPage.tsx @@ -1,7 +1,7 @@ import BlogMain from '@/components/BlogMain/BlogMain' -import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperForMainContent' import { blogPageData } from '@/mockData/blogPageData' import { TEXT_BLOG, LINK_SHOW_ALL } from '@/shared/constants/constants' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' const BlogPage = () => { return ( diff --git a/src/pages/CartPage/CartPage.tsx b/src/pages/CartPage/CartPage.tsx index 6852ca0d..be6ac7f7 100644 --- a/src/pages/CartPage/CartPage.tsx +++ b/src/pages/CartPage/CartPage.tsx @@ -1,13 +1,13 @@ import { useSelector } from 'react-redux' import { Link } from 'react-router-dom' -import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperForMainContent' import { getCartSelector } from '@/entities/CartEntity/model/selectors/selectors' import type { ICartEntity } from '@/entities/CartEntity/model/types/types' import { CartCouponApply } from '@/features/CartCouponApply/ui/CartCouponApply/CartCouponApply' import { CartEdit } from '@/features/CartEdit/ui/CartEdit/CartEdit' import Heading, { HeadingType } from '@/shared/ui/Heading/Heading' import Subheading from '@/shared/ui/Subheading/Subheading' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import { MakeOrder } from '@/widgets/MakeOrder/ui/MakeOrder/MakeOrder' import styles from './CartPage.module.scss' diff --git a/src/pages/ComparePage/ComparePage.tsx b/src/pages/ComparePage/ComparePage.tsx index 5a6cbf87..65820dd1 100644 --- a/src/pages/ComparePage/ComparePage.tsx +++ b/src/pages/ComparePage/ComparePage.tsx @@ -1,6 +1,6 @@ -import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperForMainContent' import Heading from '@/shared/ui/Heading/Heading' import Subheading from '@/shared/ui/Subheading/Subheading' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import styles from './ComparePage.module.scss' diff --git a/src/pages/ContactsPage/ContactsPage.tsx b/src/pages/ContactsPage/ContactsPage.tsx index 4e423797..41bd4922 100644 --- a/src/pages/ContactsPage/ContactsPage.tsx +++ b/src/pages/ContactsPage/ContactsPage.tsx @@ -5,6 +5,8 @@ import YMap from '@/assets/icons/YMap.svg' import FormQuestion from '@/features/FormQuestion/ui/FormQuestion' import Breadcrumbs from '@/shared/ui/Breadcrumbs/Breadcrumbs' import Heading, { HeadingType } from '@/shared/ui/Heading/Heading' +import Paragraph from '@/shared/ui/Paragraph/Paragraph' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import Map from '@/widgets/Map/Map' import styles from './ContactsPage.module.scss' @@ -16,69 +18,99 @@ const links = [ const ContactsPage: FC = () => { return ( -
-
- Контакты - -
- -
-
- Основной магазин -
    -
  • Телефон
  • -
  • +7 977 848-02-28
  • -
  • Будни, с 10.00 до 20.00
  • -
-
    -
  • Электронная почта
  • - - Maxboomofficial@yandex.ru - -
-
    -
  • Адрес магазина
  • - - - г. Москва - -
+ +
+
+ Контакты +
-
- Наши реквизиты -
-

Банковские и юридические реквизиты

-
-
    -
  • Наименование
  • -
  • Maxboom.ru
  • -
-
-
-
+ +
+
+ Основной магазин +
    +
  • + Телефон +
  • +
  • + +7 977 848-02-28 +
  • +
  • + Будни, с 10.00 до 20.00 +
  • +
    -
  • ОГРН
  • -
  • 123456789
  • +
  • + Электронная почта +
  • + + Maxboomofficial@yandex.ru +
    -
  • Адрес
  • -
  • 104329, Москва г, Талалихина
  • -
  • ул, дом № 1, корпус 3, оф.8
  • +
  • + Адрес магазина{' '} +
  • + + + г. Москва +
-
-
    -
  • Телефон
  • -
  • +7 977 848-02-28
  • +
    + Наши реквизиты +
    + Банковские и юридические реквизиты +
    +
      +
    • + Наименование +
    • +
    • + Maxboom.ru +
    +
    +
    +
      +
    • + ОГРН +
    • +
    • + 123456789 +
    • +
    +
      +
    • + Адрес +
    • +
    • + + {`104329, Москва г, Талалихина + ул, дом № 1, корпус 3, оф.8`} + +
    • +
    +
    +
    +
      +
    • + Телефон +
    • +
    • + +7 977 848-02-28 +
    • +
    +
    +
    +
- -
-
+
+ ) } diff --git a/src/pages/DeliveryPage/DeliveryPage.tsx b/src/pages/DeliveryPage/DeliveryPage.tsx index 8abdd721..293beb56 100644 --- a/src/pages/DeliveryPage/DeliveryPage.tsx +++ b/src/pages/DeliveryPage/DeliveryPage.tsx @@ -1,6 +1,6 @@ -import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperForMainContent' import Breadcrumbs from '@/shared/ui/Breadcrumbs/Breadcrumbs' import Heading, { HeadingType } from '@/shared/ui/Heading/Heading' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import styles from './DeliveryPage.module.scss' diff --git a/src/pages/ErrorPage/ErrorPage.tsx b/src/pages/ErrorPage/ErrorPage.tsx index 828f1b80..46c8af14 100644 --- a/src/pages/ErrorPage/ErrorPage.tsx +++ b/src/pages/ErrorPage/ErrorPage.tsx @@ -1,11 +1,11 @@ import { FC } from 'react' import image from '@/assets/images/errorPage/img-page-not-found.webp' -import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperForMainContent' import { Routes } from '@/shared/config/routerConfig/routes' import Heading, { HeadingType } from '@/shared/ui/Heading/Heading' import Link from '@/shared/ui/Link/Link' import Paragraph from '@/shared/ui/Paragraph/Paragraph' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import styles from './ErrorPage.module.scss' diff --git a/src/pages/FavoritesPage/FavoritesPage.tsx b/src/pages/FavoritesPage/FavoritesPage.tsx index e913b8ff..284e60a0 100644 --- a/src/pages/FavoritesPage/FavoritesPage.tsx +++ b/src/pages/FavoritesPage/FavoritesPage.tsx @@ -1,6 +1,5 @@ import { FC, Suspense, useState } from 'react' -import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperForMainContent' import { useFavorite } from '@/entities/Favorite/model/hooks/useFavorite' import SideBarMenuModal from '@/features/SideBarMenuModal' import { Routes } from '@/shared/config/routerConfig/routes' @@ -10,6 +9,7 @@ import Breadcrumbs from '@/shared/ui/Breadcrumbs/Breadcrumbs' import Heading from '@/shared/ui/Heading/Heading' import Modal from '@/shared/ui/Modal/Modal' import Spinner from '@/shared/ui/Spinner/Spinner' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import { ProductsList } from '@/widgets/ProductsList/ProductsList' import { withAdaptiveSideBar } from '@/widgets/SideBarMenu' diff --git a/src/pages/FeedbackPage/FeedbackPage.tsx b/src/pages/FeedbackPage/FeedbackPage.tsx index 03651c2c..ebaead36 100644 --- a/src/pages/FeedbackPage/FeedbackPage.tsx +++ b/src/pages/FeedbackPage/FeedbackPage.tsx @@ -3,18 +3,19 @@ import { useSelector } from 'react-redux' import { useParams } from 'react-router' import { StateSchema } from '@/app/providers/StoreProvider' -import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperForMainContent' import { getAverageMark, getFirstFeedbacks, getNextFeedbacks } from '@/features/Reviews/model/slice/feedbacksSlice' import { bodyScrollControl } from '@/shared/libs/helpers/popupHelper' +import { scrollPageToTop } from '@/shared/libs/helpers/scrollPageToTop' import { useAppDispatch } from '@/shared/libs/hooks/store' import { useResize } from '@/shared/libs/hooks/useResize' import Breadcrumbs from '@/shared/ui/Breadcrumbs/Breadcrumbs' import { Button, ButtonSize, ButtonTheme } from '@/shared/ui/Button/Button' import Heading from '@/shared/ui/Heading/Heading' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import { AveregeMark } from '@/widgets/AveregeMark/AveregeMark' import { FeedbackForm } from '@/widgets/FeedbackForm/FeedbackForm' import { FeedbackList } from '@/widgets/FeedbackList/FeedbackList' @@ -42,6 +43,8 @@ export const FeedbackPage = () => { dispatch(getFirstFeedbacks()) dispatch(getAverageMark()) + + scrollPageToTop() }, []) const fetchNextPage = () => { @@ -63,7 +66,7 @@ export const FeedbackPage = () => {
{ diff --git a/src/pages/LoginPage/LoginPage.tsx b/src/pages/LoginPage/LoginPage.tsx index db9c1981..30334417 100644 --- a/src/pages/LoginPage/LoginPage.tsx +++ b/src/pages/LoginPage/LoginPage.tsx @@ -1,10 +1,10 @@ import { Suspense, lazy, useCallback } from 'react' import { useNavigate } from 'react-router' -import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperForMainContent' import { Routes } from '@/shared/config/routerConfig/routes' import Heading from '@/shared/ui/Heading/Heading' import Spinner from '@/shared/ui/Spinner/Spinner' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import styles from './LoginPage.module.scss' diff --git a/src/pages/LogoutPage/LogoutPage.tsx b/src/pages/LogoutPage/LogoutPage.tsx index 714949f7..b3ba9d9b 100644 --- a/src/pages/LogoutPage/LogoutPage.tsx +++ b/src/pages/LogoutPage/LogoutPage.tsx @@ -2,7 +2,6 @@ import { FC, Suspense, useMemo, useState } from 'react' import { useSelector } from 'react-redux' import { useNavigate } from 'react-router' -import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperForMainContent' import { getUserAuthStatus } from '@/features/login/model/selectors/getUserAuthStatus' import SideBarMenuModal from '@/features/SideBarMenuModal' import { Routes } from '@/shared/config/routerConfig/routes' @@ -13,6 +12,7 @@ import Heading from '@/shared/ui/Heading/Heading' import Modal from '@/shared/ui/Modal/Modal' import Paragraph from '@/shared/ui/Paragraph/Paragraph' import Spinner from '@/shared/ui/Spinner/Spinner' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import { withAdaptiveSideBar } from '@/widgets/SideBarMenu' import styles from './LogoutPage.module.scss' diff --git a/src/pages/MainPage/MainPage.tsx b/src/pages/MainPage/MainPage.tsx index 4d080d2a..ce4801c9 100644 --- a/src/pages/MainPage/MainPage.tsx +++ b/src/pages/MainPage/MainPage.tsx @@ -1,6 +1,6 @@ import { FC } from 'react' -import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperForMainContent' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import Advantages from '@/widgets/Advantages' import ArticleBlock from '@/widgets/ArticleBlock' import BannerBlock from '@/widgets/BannerBlock' diff --git a/src/pages/PrivacyPage/PrivacyPage.module.scss b/src/pages/PrivacyPage/PrivacyPage.module.scss new file mode 100644 index 00000000..9e09ffb7 --- /dev/null +++ b/src/pages/PrivacyPage/PrivacyPage.module.scss @@ -0,0 +1,27 @@ +@use '../../shared/styles/utils/mixins' as media; + +.privacyPage { + width: 100%; + display: flex; + flex-direction: column; + align-items: flex-start; + + &__pageDescriptor { + width: 100%; + display: flex; + flex-direction: column; + gap: 10px; + } + + &__contant { + margin-top: 40px; + width: 100%; + display: flex; + align-items: flex-start; + gap: 25px; + + @include media.respond-to('large') { + flex-direction: column-reverse; + } + } +} diff --git a/src/pages/PrivacyPage/PrivacyPage.tsx b/src/pages/PrivacyPage/PrivacyPage.tsx new file mode 100644 index 00000000..05e1c6af --- /dev/null +++ b/src/pages/PrivacyPage/PrivacyPage.tsx @@ -0,0 +1,33 @@ +import { FC } from 'react' + +import Breadcrumbs from '@/shared/ui/Breadcrumbs/Breadcrumbs' +import Heading from '@/shared/ui/Heading/Heading' +import Paragraph from '@/shared/ui/Paragraph/Paragraph' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' + +import styles from './PrivacyPage.module.scss' + +/** + * Страница с политикой безопасности. + * TODO наполнить страницу смыслом + */ +export const PrivacyPage: FC = () => { + const links = [ + { heading: 'Главная', href: '/' }, + { heading: 'Политика безопасности', href: '' } + ] + + return ( + +
+
+ Политика безопасности + +
+
+ Политика безопасности +
+
+
+ ) +} diff --git a/src/pages/ProductPage/ProductPage.tsx b/src/pages/ProductPage/ProductPage.tsx index 20566765..c1289efb 100644 --- a/src/pages/ProductPage/ProductPage.tsx +++ b/src/pages/ProductPage/ProductPage.tsx @@ -3,10 +3,11 @@ import { useSelector } from 'react-redux' import { useParams } from 'react-router' import { StateSchema } from '@/app/providers/StoreProvider' -import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperForMainContent' +import { scrollPageToTop } from '@/shared/libs/helpers/scrollPageToTop' import { useAppDispatch } from '@/shared/libs/hooks/store' import Breadcrumbs from '@/shared/ui/Breadcrumbs/Breadcrumbs' import Heading from '@/shared/ui/Heading/Heading' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import Advantages from '@/widgets/Advantages' import { Product } from '@/widgets/Product/Product' import { ProductInfo } from '@/widgets/ProductInfo/ProductInfo' @@ -31,6 +32,8 @@ export const ProductPage = () => { ] useEffect(() => { + scrollPageToTop() + if (slug) dispatch(getProduct(slug)) }, [slug]) diff --git a/src/pages/ProductsPage/ProductsPage.tsx b/src/pages/ProductsPage/ProductsPage.tsx index fad3dcdd..4b1077d1 100644 --- a/src/pages/ProductsPage/ProductsPage.tsx +++ b/src/pages/ProductsPage/ProductsPage.tsx @@ -13,7 +13,6 @@ import { PageDescriptionSkeleton } from '@/components/PageDescription/PageDescri import { Pagination } from '@/components/Pagination/Pagination' import { selectNumberOfPage } from '@/components/Pagination/selectors/selectors' import { setNumberOfPage } from '@/components/Pagination/slice/paginationSlice' -import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperForMainContent' import { selectCategoryId, selectCategorySlug } from '@/entities/Category/selectors/categorySelectors' import { setCategoryId } from '@/entities/Category/slice/categoryIdSlice' import { getLoading, getProductsOfCategorySelector } from '@/pages/ProductsPage/selectors/selectors' @@ -23,6 +22,7 @@ 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 WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import { CategoryList } from '@/widgets/CategoryList/CategoryList' import { ProductSkeleton } from '@/widgets/ProductItem/ProductSkeleton/ProductSkeleton' import { ProductsList } from '@/widgets/ProductsList/ProductsList' diff --git a/src/pages/ReviewsPage/ReviewsPage.module.scss b/src/pages/ReviewsPage/ReviewsPage.module.scss new file mode 100644 index 00000000..8bdcc4c7 --- /dev/null +++ b/src/pages/ReviewsPage/ReviewsPage.module.scss @@ -0,0 +1,27 @@ +@use '../../shared/styles/utils/mixins' as media; + +.reviewsPage { + width: 100%; + display: flex; + flex-direction: column; + align-items: flex-start; + + &__pageDescriptor { + width: 100%; + display: flex; + flex-direction: column; + gap: 10px; + } + + &__contant { + margin-top: 40px; + width: 100%; + display: flex; + align-items: flex-start; + gap: 25px; + + @include media.respond-to('large') { + flex-direction: column-reverse; + } + } +} diff --git a/src/pages/ReviewsPage/ReviewsPage.tsx b/src/pages/ReviewsPage/ReviewsPage.tsx new file mode 100644 index 00000000..fc3bc1e6 --- /dev/null +++ b/src/pages/ReviewsPage/ReviewsPage.tsx @@ -0,0 +1,35 @@ +import { FC } from 'react' + +import { Routes } from '@/shared/config/routerConfig/routes' +import Breadcrumbs from '@/shared/ui/Breadcrumbs/Breadcrumbs' +import Heading from '@/shared/ui/Heading/Heading' +import Paragraph from '@/shared/ui/Paragraph/Paragraph' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' + +import styles from './ReviewsPage.module.scss' + +/** + * Страница с обзорами. + * TODO наполнить страницу смыслом + */ +export const ReviewsPage: FC = () => { + const links = [ + { heading: 'Главная', href: '/' }, + { heading: 'Блог', href: Routes.BLOG }, + { heading: 'Обзоры', href: '' } + ] + + return ( + +
+
+ Обзоры + +
+
+ Обзоры +
+
+
+ ) +} diff --git a/src/pages/SearchResultsPage/SearchResultsPage.tsx b/src/pages/SearchResultsPage/SearchResultsPage.tsx index a1ec43cb..a5fe5b63 100644 --- a/src/pages/SearchResultsPage/SearchResultsPage.tsx +++ b/src/pages/SearchResultsPage/SearchResultsPage.tsx @@ -5,11 +5,11 @@ import { useParams } from 'react-router-dom' import { ThunkExtraArg } from '@/app/providers/StoreProvider/config/StateSchema' import { RootState } from '@/app/providers/StoreProvider/config/store' -import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperForMainContent' import { selectSearchResult } from '@/features/SearchProduct/selectors/searchProductSelectors' import { search } from '@/features/SearchProduct/slice/searchProductSlice' import Heading from '@/shared/ui/Heading/Heading' import Subheading from '@/shared/ui/Subheading/Subheading' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import styles from './SearchResultsPage.module.scss' diff --git a/src/pages/TermsPage/TermsPage.module.scss b/src/pages/TermsPage/TermsPage.module.scss new file mode 100644 index 00000000..69a55b2a --- /dev/null +++ b/src/pages/TermsPage/TermsPage.module.scss @@ -0,0 +1,27 @@ +@use '../../shared/styles/utils/mixins' as media; + +.termsPage { + width: 100%; + display: flex; + flex-direction: column; + align-items: flex-start; + + &__pageDescriptor { + width: 100%; + display: flex; + flex-direction: column; + gap: 10px; + } + + &__contant { + margin-top: 40px; + width: 100%; + display: flex; + align-items: flex-start; + gap: 25px; + + @include media.respond-to('large') { + flex-direction: column-reverse; + } + } +} diff --git a/src/pages/TermsPage/TermsPage.tsx b/src/pages/TermsPage/TermsPage.tsx new file mode 100644 index 00000000..8faaa8ab --- /dev/null +++ b/src/pages/TermsPage/TermsPage.tsx @@ -0,0 +1,33 @@ +import { FC } from 'react' + +import Breadcrumbs from '@/shared/ui/Breadcrumbs/Breadcrumbs' +import Heading from '@/shared/ui/Heading/Heading' +import Paragraph from '@/shared/ui/Paragraph/Paragraph' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' + +import styles from './TermsPage.module.scss' + +/** + * Страница с условиями соглашения. + * TODO наполнить страницу смыслом + */ +export const TermsPage: FC = () => { + const links = [ + { heading: 'Главная', href: '/' }, + { heading: 'Условия соглашения', href: '' } + ] + + return ( + +
+
+ Условия соглашения + +
+
+ Условия соглашения +
+
+
+ ) +} diff --git a/src/pages/VouchersPage/VouchersPage.tsx b/src/pages/VouchersPage/VouchersPage.tsx index 61dbbb31..8088f66c 100644 --- a/src/pages/VouchersPage/VouchersPage.tsx +++ b/src/pages/VouchersPage/VouchersPage.tsx @@ -1,5 +1,5 @@ -import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperForMainContent' import Heading, { HeadingType } from '@/shared/ui/Heading/Heading' +import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' import FormBuyGiftCertificate from '@/widgets/FormBuyGiftCertificate' import styles from './VouchersPage.module.scss' diff --git a/src/shared/config/routerConfig/routes.ts b/src/shared/config/routerConfig/routes.ts index 3bcefa0e..d5fffef6 100644 --- a/src/shared/config/routerConfig/routes.ts +++ b/src/shared/config/routerConfig/routes.ts @@ -15,6 +15,7 @@ export enum Routes { PRIVACY = '/privacy', PRODUCTS = '/products/', PRODUCTS_ID = '/products/:id', + FEEDBACKS = '/feedbacks', REVIEWS = '/reviews', SEARCH = '/search/:query', TERMS = '/terms', diff --git a/src/shared/libs/helpers/scrollPageToTop.ts b/src/shared/libs/helpers/scrollPageToTop.ts new file mode 100644 index 00000000..2decd7ff --- /dev/null +++ b/src/shared/libs/helpers/scrollPageToTop.ts @@ -0,0 +1,6 @@ +/** + * Функция выполняет скролл в верх страницы + */ +export const scrollPageToTop = () => { + window.scrollTo(0, 0) +} diff --git a/src/shared/mockData/catalogListData.ts b/src/shared/mockData/catalogListData.ts index d01f615f..2435250c 100644 --- a/src/shared/mockData/catalogListData.ts +++ b/src/shared/mockData/catalogListData.ts @@ -3,7 +3,7 @@ import { Routes } from '@/shared/config/routerConfig/routes' export const linkItems = [ { index: 0, label: 'Блог', to: Routes.BLOG }, { index: 1, label: 'Новости', to: Routes.NEWS }, - { index: 2, label: 'Отзывы о магазине', to: `${Routes.REVIEWS}/0` }, + { index: 2, label: 'Отзывы о магазине', to: `${Routes.FEEDBACKS}/0` }, { index: 3, label: 'Контакты', to: Routes.CONTACTS } ] diff --git a/src/components/WrapperForMainContent/WrapperForMainContent.tsx b/src/shared/ui/WrapperForMainContent/WrapperForMainContent.tsx similarity index 100% rename from src/components/WrapperForMainContent/WrapperForMainContent.tsx rename to src/shared/ui/WrapperForMainContent/WrapperForMainContent.tsx diff --git a/src/components/WrapperForMainContent/wrapper.module.scss b/src/shared/ui/WrapperForMainContent/wrapper.module.scss similarity index 100% rename from src/components/WrapperForMainContent/wrapper.module.scss rename to src/shared/ui/WrapperForMainContent/wrapper.module.scss diff --git a/src/widgets/FeedbackList/FeedbackList.tsx b/src/widgets/FeedbackList/FeedbackList.tsx index a465281a..c86350a3 100644 --- a/src/widgets/FeedbackList/FeedbackList.tsx +++ b/src/widgets/FeedbackList/FeedbackList.tsx @@ -8,7 +8,7 @@ import styles from './FeedbackList.module.scss' import type { IFeedback } from './model/types/types' interface IFeedbackListProps { - targetId: number + targetId: number | undefined feedbacks: IFeedback[] isLoading: boolean nextPage: Nullable @@ -33,7 +33,7 @@ export const FeedbackList: FC = ({ const virtuosoRef = useRef(null) useEffect(() => { - if (virtuosoRef && virtuosoRef.current) { + if (virtuosoRef && virtuosoRef.current && targetId) { virtuosoRef.current.scrollToIndex({ index: targetId, behavior: 'smooth' }) } }, [targetId]) diff --git a/src/widgets/ReviewsBlock/ui/ReviewsBlock.tsx b/src/widgets/ReviewsBlock/ui/ReviewsBlock.tsx index f74115c9..107ba4db 100644 --- a/src/widgets/ReviewsBlock/ui/ReviewsBlock.tsx +++ b/src/widgets/ReviewsBlock/ui/ReviewsBlock.tsx @@ -46,7 +46,7 @@ const ReviewsBlock: FC = () => { alt="картинка" isLink={true} subtitle={LINK_REVIEWS_ALL} - link={`${Routes.REVIEWS}/${0}`} + link={`${Routes.FEEDBACKS}/${0}`} /> {isScreenMd ? (
    @@ -93,7 +93,7 @@ const ReviewsBlock: FC = () => { index={index} /> ))} - + )}