-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into enhancement_221_api_about_us
- Loading branch information
Showing
39 changed files
with
577 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { RootState } from '@/app/providers/StoreProvider/config/store' | ||
|
||
export const selectFilterProducts = (state: RootState) => state.categoryFilters.filterProducts | ||
|
||
export const selectFilterQuantity = (state: RootState) => state.categoryFilters.productQuantityFilter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { createSlice } from '@reduxjs/toolkit' | ||
|
||
import type { ICategoryFiltersSchema } from '@/components/Dropdown/types/types' | ||
import { SORT_NAMES, SORT_VALUES } from '@/shared/constants/constants' | ||
|
||
const initialState: ICategoryFiltersSchema = { | ||
filterProducts: { name: SORT_NAMES.NAMES_A_YA, value: SORT_VALUES.NAMES_A_YA }, | ||
productQuantityFilter: { name: '15', value: '15' } | ||
} | ||
|
||
const categoryFiltersSlice = createSlice({ | ||
name: 'categoryFilters', | ||
initialState, | ||
reducers: { | ||
setFilterProducts(state, action) { | ||
state.filterProducts = action.payload | ||
}, | ||
setProductQuantityFilter(state, action) { | ||
state.productQuantityFilter = action.payload | ||
} | ||
} | ||
}) | ||
|
||
export const { reducer: categoryFiltersSliceReducer } = categoryFiltersSlice | ||
|
||
export const { setFilterProducts, setProductQuantityFilter } = categoryFiltersSlice.actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export interface ICategoryFiltersSchema { | ||
filterProducts: IFilterSchema | ||
productQuantityFilter: IFilterSchema | ||
} | ||
|
||
export type IFilterSchema = { | ||
name: string | ||
value: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
src/entities/ProductEntity/ui/ProductEntity/ProductEntity.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.