Skip to content

Commit

Permalink
#339-pagination(conflict)
Browse files Browse the repository at this point in the history
  • Loading branch information
Margarita22 committed May 18, 2024
2 parents 9229fb5 + bc2ce6c commit 3382403
Show file tree
Hide file tree
Showing 180 changed files with 4,050 additions and 977 deletions.
19 changes: 19 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"react-redux": "8.1.2",
"react-router": "6.15.0",
"react-router-dom": "6.15.0",
"react-virtuoso": "^4.7.10",
"yup": "^1.3.2"
},
"devDependencies": {
Expand Down
6 changes: 2 additions & 4 deletions src/app/providers/StoreProvider/config/StateSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,26 @@ 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 { StoreReviewsSchema } from '@/widgets/ReviewsBlock/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 { IFeedbackSchema } from '@/pages/FeedbackPage/model/types/types'
import { ICategorySchema, IMainCategorySchema } from '@/widgets/CategoryList/types/types'
import { ICategoryFiltersSchema } from '@/components/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'

export interface StateSchema {
aboutUs: IAboutUsSchema
login: LoginSchema
storeReviews: StoreReviewsSchema
category: CategorySchema
categoryList: CategoryListSchema
coreBaseFooter: CoreBaseFooterSchema
Expand All @@ -37,7 +35,6 @@ export interface StateSchema {
blogPosts: IBlogPostsSchema
product: TProductSchema
categoryProduct: ICategoryProductsSchema
feedback: IFeedbackSchema
feedbackForm: IFeedbackFormSchema
categoryId: CategoryId
categorySlug: CategorySlug
Expand All @@ -47,6 +44,7 @@ export interface StateSchema {
cartEntity: ICartEntitySchema
categoryFilters: ICategoryFiltersSchema
productAmount: IProductAmountStateSchema
feedbacks: IFeedbackSchema
pagination: TNumberOfPageSchema
}

Expand Down
6 changes: 2 additions & 4 deletions src/app/providers/StoreProvider/config/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { $api } from '@/shared/api/api'
import categorySlice from '@/entities/Category/slice/categorySlice'
import brandSlice from '@/widgets/BrandBlock/slice/brandSlice'
import searchProductSlice from '@/features/SearchProduct/slice/searchProductSlice'
import { storeReviewsReducer } from '@/widgets/ReviewsBlock/model/slice/reviewsSlice'
import footerSlice from '@/widgets/Footer/model/slice/footerSlice'
import { shopNewsReducer } from '@/widgets/NewsBlock/model/slice/shopNewsSlice'
import { storiesReducer } from '@/widgets/StoriesBlock/model/slice/storiesSlice'
Expand All @@ -18,13 +17,13 @@ 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 { feedbackReducer } from '@/pages/FeedbackPage/model/slice/feedbackSlice'
import { categoryFiltersSliceReducer } from '@/components/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'

export type RootState = StateSchema
Expand All @@ -37,14 +36,13 @@ const rootReducer: ReducersMapObject<RootState> = {
coreBaseFooter: footerSlice,
brand: brandSlice,
searchResult: searchProductSlice,
storeReviews: storeReviewsReducer,
shopNews: shopNewsReducer,
stories: storiesReducer,
blogPosts: blogPostsReducer,
product: productSliceReducer,
categoryProduct: categoriesProductsReducer,
categoryList: categoryGridSlice,
feedback: feedbackReducer,
feedbacks: feedbacksReducer,
feedbackForm: feedbackFormReducer,
categoryId: categoryIdSliceReducer,
categorySlug: categorySlugSliceReducer,
Expand Down
10 changes: 3 additions & 7 deletions src/app/router/AppRouter/ui/AppRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import ComparePage from '@/pages/ComparePage/ComparePage'
import ContactsPage from '@/pages/ContactsPage/ContactsPage'
import DeliveryPage from '@/pages/DeliveryPage/DeliveryPage'
import ErrorPage from '@/pages/ErrorPage/ErrorPage'
import FavoritesPage from '@/pages/FavoritesPage/FavoritesPage'
import { FavoritesPage } from '@/pages/FavoritesPage/FavoritesPage'
import { FeedbackPage } from '@/pages/FeedbackPage/FeedbackPage'
import FormReturnPage from '@/pages/FormReturnPage/FormReturnPage'
import HelpPage from '@/pages/HelpPage/HelpPage'
Expand Down Expand Up @@ -44,7 +44,7 @@ export const AppRouter = createBrowserRouter([
element: <ProductsPage /> // временная заглушка нужна страница со всеми брендами
},
{
path: Routes.CATEGORIES + '/all',
path: Routes.CATEGORIES,
element: <CategoryPage />
},
{
Expand Down Expand Up @@ -88,7 +88,7 @@ export const AppRouter = createBrowserRouter([
element: <ProductsPage />
},
{
path: Routes.REVIEWS,
path: Routes.REVIEWS + '/:index',
element: <FeedbackPage />
},
{
Expand All @@ -99,10 +99,6 @@ export const AppRouter = createBrowserRouter([
path: Routes.HELP,
element: <HelpPage />
},
{
path: Routes.STORE_REVIEWS,
element: <ProductsPage /> // временная заглушка нужна страница с отзывами о магазине
},
{
path: Routes.TERMS,
element: <ProductsPage /> // временная заглушка нужна страница с условиями соглашения
Expand Down
4 changes: 2 additions & 2 deletions src/assets/icons/IconCart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/assets/icons/IconCatalog.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/IconHeaderMenuArrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3382403

Please sign in to comment.