-
Notifications
You must be signed in to change notification settings - Fork 719
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
914 additions
and
536 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux'; | ||
import type { RootState, AppDispatch } from './store'; | ||
|
||
// Use these hooks everywhere instead of useDispatch and useSelector | ||
export const useAppDispatch = () => useDispatch<AppDispatch>(); | ||
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector; |
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,22 @@ | ||
import { configureStore, ThunkAction, Action } from '@reduxjs/toolkit'; | ||
import productsSlice from '../features/productsSlice'; | ||
import productInfoSlice from '../features/productInfoSlice'; | ||
|
||
export const store = configureStore({ | ||
reducer: { | ||
products: productsSlice, | ||
productInfo: productInfoSlice, | ||
}, | ||
}); | ||
|
||
export type AppDispatch = typeof store.dispatch; | ||
export type RootState = ReturnType<typeof store.getState>; | ||
|
||
/* eslint-disable @typescript-eslint/indent */ | ||
export type AppThunk<ReturnType = void> = ThunkAction< | ||
ReturnType, | ||
RootState, | ||
unknown, | ||
Action<string> | ||
>; | ||
/* eslint-enable @typescript-eslint/indent */ |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,17 +1,13 @@ | ||
import './NoResults.scss'; | ||
|
||
export const NoResults: React.FC<{ category: string }> = ({ category }) => { | ||
if (category === 'cart') { | ||
return ( | ||
<div className="results-not-found">Your cart is empty</div> | ||
); | ||
} | ||
|
||
return ( | ||
<div className="results-not-found"> | ||
{category} | ||
{' '} | ||
not found | ||
{category === 'cart' ? ( | ||
'Your cart is empty' | ||
) : ( | ||
`${category} not found` | ||
)} | ||
</div> | ||
); | ||
}; |
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,6 @@ | ||
.indicator-name { | ||
display: flex; | ||
align-items: center; | ||
gap: 8px; | ||
margin-bottom: 40px; | ||
} |
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
13 changes: 0 additions & 13 deletions
13
src/components/PageIndicator/Phonespage/PageIndicator.scss
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.