How suhrobkholmurodov/react-pizza works
This is a React pizza storefront: visitors browse and filter a catalog, then manage favorites and a cart. The route/layout layer hosts the pages; Redux slices hold catalog, filter, cart, favorite, and review-filter state. The README is a generic stack overview, so product capabilities are inferred from the named source modules; unsampled behavior and external data-service wiring are not asserted.
Main entry points: store.ts Redux store · App.tsx App routes · Home.tsx Home catalog · slice.ts Cart state
Components 21
Application shell
- App routes
src/App.tsx - Main layout
src/layouts/MainLayout.tsx - Localization hook
src/hooks/useLocalization.ts
Pizza catalog
- Home catalog
src/pages/Home.tsx - Catalog controls
src/components - Pizza cards
src/components/PizzaBlock.tsx - Pizza details
src/components/PizzaDrawer.tsx - Pizza loading
src/redux/pizza/asyncActions.ts - Review controls
src/components/ReviewFilterControls.tsx
Cart and favorites
- Cart page
src/pages/Cart.tsx - Cart components
src/components/Cart - Favorites page
src/pages/Favorites.tsx - Favorite items
src/components/Favorites/FavoritesItem.tsx
State and utilities
- Cart state
src/redux/cart/slice.ts - Favorites state
src/redux/favorites/slice.ts - Catalog filters
src/redux/filter/slice.ts - Review filter state
src/redux/commentFilter/slice.ts - Pizza state
src/redux/pizza/slice.ts - Redux store
src/redux/store.ts - Cart total utility
src/utils/calcTotalPrice.ts
Other components
- Visitor
Connections 25
- Visitor → App routes: opens
src/App.tsx - App routes → Main layout: routes through
src/App.tsx - App routes → Home catalog: routes to
src/App.tsx - App routes → Cart page: routes to
src/App.tsx - App routes → Favorites page: routes to
src/App.tsx - Main layout → Cart state: selects
src/layouts/MainLayout.tsx - Main layout → Favorites state: selects
src/layouts/MainLayout.tsx - Home catalog → Pizza loading: dispatches fetch
src/pages/Home.tsx - Home catalog → Catalog controls: renders
src/pages/Home.tsx - Home catalog → Pizza cards: renders
src/pages/Home.tsx - Home catalog → Catalog filters: dispatches filters
src/pages/Home.tsx - Pizza loading → Pizza state: updates
src/redux/pizza/slice.ts - Cart page → Cart components: renders
src/pages/Cart.tsx - Cart page → Cart state: selects
src/pages/Cart.tsx - Favorites page → Favorite items: renders
src/pages/Favorites.tsx - Favorites page → Favorites state: dispatches clear
src/pages/Favorites.tsx - Favorite items → Favorites state: dispatches changes
src/components/Favorites/FavoritesItem.tsx - Favorite items → Pizza details: opens details
src/components/Favorites/FavoritesItem.tsx - Review controls → Review filter state: dispatches filter
src/components/ReviewFilterControls.tsx - Cart state → Cart total utility: calculates totals
src/redux/cart/slice.ts - Redux store → Cart state: registers reducer
src/redux/store.ts - Redux store → Favorites state: registers reducer
src/redux/store.ts - Redux store → Catalog filters: registers reducer
src/redux/store.ts - Redux store → Review filter state: registers reducer
src/redux/store.ts - Redux store → Pizza state: registers reducer
src/redux/store.ts