Skip to content

Commit

Permalink
Merge branch 'master' into enhancement-365-create-SubscriptionPage
Browse files Browse the repository at this point in the history
  • Loading branch information
aimenin authored Jun 25, 2024
2 parents 988657b + 70d97c2 commit ca4ac1e
Show file tree
Hide file tree
Showing 218 changed files with 2,957 additions and 1,905 deletions.
2 changes: 1 addition & 1 deletion src/app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect } from 'react'
import { RouterProvider } from 'react-router-dom'

import { getCart } from '@/entities/CartEntity/model/slice/cartEntitySlice'
import { getCart } from '@/entities/CartEntity/model/services/getCart'
import { getCurrentUser } from '@/features/login/model/services/getCurrentUser/getCurrentUser'
import { loginActions } from '@/features/login/model/slice/loginSlice'
import { $api } from '@/shared/api/api'
Expand Down
32 changes: 14 additions & 18 deletions src/app/providers/StoreProvider/config/StateSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,21 @@ import { SearchResultSchema } from '@/features/SearchProduct/types/types'
import { LoginSchema } from '@/features/login/model/types/types'
import { BrandSchema } from '@/widgets/BrandBlock/types/types'
import { ApiInstance } from '@/shared/api/api'
import { ShopNewsSchema } from '@/widgets/NewsBlock/model/types/types'
import { IBlogPostsSchema } from '@/widgets/BlogBlock/model/types/types'
import { CoreBaseFooterSchema } from '@/widgets/Footer/model/types/types'
import { IStoriesSchema } from '@/widgets/StoriesBlock/model/types/types'
import { CoreBaseHeaderSchema } from '@/widgets/Header/model/types/types'
import { TProductSchema } from '@/pages/ProductPage/model/types/productTypes'
import { CategoryListSchema } from '@/widgets/CategoryGrid/model/types/types'
import { ICategoryProductsSchema } from '@/pages/ProductsPage/types/types'
import { ICategorySchema, IMainCategorySchema } from '@/widgets/CategoryList/types/types'
import { ICategoryFiltersSchema } from '@/components/Dropdown/types/types'
import type { ShopNewsSchema } from '@/widgets/NewsBlock/model/types/types'
import type { IBlogPostsSchema } from '@/widgets/BlogBlock/model/types/types'
import type { CoreBaseFooterSchema } from '@/widgets/Footer/model/types/types'
import type { IStoriesSchema } from '@/widgets/StoriesBlock/model/types/types'
import type { CoreBaseHeaderSchema } from '@/widgets/Header/model/types/types'
import type { TProductSchema } from '@/pages/ProductPage/model/types/productTypes'
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 '@/shared/ui/Dropdown/types/types'
import type { IFeedbackFormSchema } from '@/widgets/FeedbackForm/model/scheme/feedbackFormSliceSchema'
import { ICartEntitySchema } from '@/entities/CartEntity/model/types/types'
import { IAboutUsSchema } from '@/pages/AboutUsPage/model/types/types'
import { ICartSchema } from '@/pages/CartPage/model/types'
import { IProductAmountStateSchema } from '@/features/CartEdit/model/types'
import { IFeedbackSchema } from '@/features/Reviews/model/types/types'
import { TNumberOfPageSchema } from '@/components/Pagination/types/types'
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 '@/widgets/Pagination/types/types'

export interface StateSchema {
aboutUs: IAboutUsSchema
Expand All @@ -40,10 +38,8 @@ export interface StateSchema {
categorySlug: CategorySlug
categoryBranches: ICategorySchema
getCategories: IMainCategorySchema
cart: ICartSchema
cartEntity: ICartEntitySchema
categoryFilters: ICategoryFiltersSchema
productAmount: IProductAmountStateSchema
feedbacks: IFeedbackSchema
pagination: TNumberOfPageSchema
}
Expand Down
8 changes: 2 additions & 6 deletions src/app/providers/StoreProvider/config/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +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 { cartReducer } from '@/pages/CartPage/model/slice'
import { cartEntityReducer } from '@/entities/CartEntity/model/slice/cartEntitySlice'
import { productAmountReducer } from '@/features/CartEdit/model/slice/productAmountSlice'
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

Expand All @@ -49,9 +47,7 @@ const rootReducer: ReducersMapObject<RootState> = {
categoryBranches: categoryBranchesReducer,
getCategories: getCategoriesReducer,
cartEntity: cartEntityReducer,
cart: cartReducer,
categoryFilters: categoryFiltersSliceReducer,
productAmount: productAmountReducer,
pagination: paginationSliceReducer
}

Expand Down
29 changes: 25 additions & 4 deletions src/app/router/AppRouter/ui/AppRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ 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 SubscriptionPage from '@/pages/SubscriptionPage/SubscriptionPage'
import ShopNewsPage from '@/pages/ShopNewsPage/ShopNewsPage'

Check failure on line 27 in src/app/router/AppRouter/ui/AppRouter.tsx

View workflow job for this annotation

GitHub Actions / pipeline (18.x)

`@/pages/ShopNewsPage/ShopNewsPage` import should occur before import of `@/pages/SubscriptionPage/SubscriptionPage`
import { TermsPage } from '@/pages/TermsPage/TermsPage'
import VouchersPage from '@/pages/VouchersPage/VouchersPage'
import { Routes } from '@/shared/config/routerConfig/routes'

Expand All @@ -31,7 +35,7 @@ export const AppRouter = createBrowserRouter([
{
path: Routes.HOME,
element: <RootPage />,
errorElement: <ErrorPage />,
// errorElement: <ErrorPage />,
children: [
{
path: '',
Expand Down Expand Up @@ -83,7 +87,7 @@ export const AppRouter = createBrowserRouter([
},
{
path: Routes.PRIVACY,
element: <ProductsPage /> // временная заглушка нужна страница с политикой безопасности
element: <PrivacyPage />
},
{
path: Routes.PRODUCTS,
Expand All @@ -94,9 +98,13 @@ export const AppRouter = createBrowserRouter([
element: <ProductsPage />
},
{
path: Routes.REVIEWS + '/:index',
path: Routes.FEEDBACKS + '/:index',
element: <FeedbackPage />
},
{
path: Routes.REVIEWS,
element: <ReviewsPage />
},
{
path: Routes.SEARCH,
element: <SearchResultsPage />
Expand All @@ -107,7 +115,7 @@ export const AppRouter = createBrowserRouter([
},
{
path: Routes.TERMS,
element: <ProductsPage /> // временная заглушка нужна страница с условиями соглашения
element: <TermsPage />
},
{
path: Routes.ADD_RETURN,
Expand Down Expand Up @@ -140,7 +148,20 @@ export const AppRouter = createBrowserRouter([
{
path: Routes.NEWSLETTER,
element: <SubscriptionPage />
},
{
path: Routes.SUBSCRIBE,
element: <CreateAccountPage /> //TODO реалзиовать страницу подписки
},
{
path: Routes.ERROR,
element: <ErrorPage />
},
{
path: Routes.SHOP_NEWS,
element: <ShopNewsPage />
}

/* {
path: Routes.CERTIFICATE,
element: <Certificate />
Expand Down
1 change: 1 addition & 0 deletions src/app/styles/base/_reset.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
body {
margin: 0 auto;
max-width: 100vw;
height: 100%;
font-family:
Roboto,
Arial,
Expand Down
Loading

0 comments on commit ca4ac1e

Please sign in to comment.