25 | Edit src/App.tsx and save to test HMR
26 |
29 | Click on the Vite and React logos to learn more 30 |
31 | > 32 | ) 33 | } 34 | 35 | export default App 36 | -------------------------------------------------------------------------------- /src/components/ui/input.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "../../lib/utils" 4 | 5 | function Input({ className, type, ...props }: React.ComponentProps<"input">) { 6 | return ( 7 | 18 | ) 19 | } 20 | 21 | export { Input } 22 | -------------------------------------------------------------------------------- /src/redux/reduxStore.ts: -------------------------------------------------------------------------------- 1 | import { combineReducers ,configureStore} from "@reduxjs/toolkit" 2 | import userSlice from "./userSlice" 3 | import restaurantSlice from "./restaurantSlice" 4 | import cartSlice from "./cartSlice" 5 | 6 | import { 7 | persistReducer, 8 | FLUSH, 9 | REHYDRATE, 10 | PAUSE, 11 | PERSIST, 12 | PURGE, 13 | REGISTER, 14 | } from 'redux-persist' 15 | import storage from 'redux-persist/lib/storage' 16 | 17 | 18 | const persistConfig = { 19 | key: 'root', 20 | version: 1, 21 | storage, 22 | } 23 | 24 | const rootReducer = combineReducers({ 25 | user : userSlice , 26 | restaurant: restaurantSlice, 27 | cart: cartSlice, 28 | 29 | }) 30 | const persistedReducer = persistReducer(persistConfig, rootReducer) 31 | const store = configureStore({ 32 | reducer: persistedReducer, 33 | middleware: (getDefaultMiddleware) => 34 | getDefaultMiddleware({ 35 | serializableCheck: { 36 | ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER], 37 | }, 38 | }), 39 | }) 40 | 41 | export default store 42 | 43 | export type RootState = ReturnType{feature.desc}
29 |{menu.description}
36 |37 | Price: ${menu.price} 38 |
39 | 40 | 46 |"{user.feedback}"
45 |${dish.price}
38 |
49 |
56 | Available Menus: {singleRestaurant?.menus?.length || 0} 57 |
58 |30 | Search restaurants by name, city, or country and explore your next favorite meal. 31 |
32 | 33 | {/* Search Bar */} 34 |
59 | Order summary:
86 | 87 | {order.cartItems.map((item, idx) => ( 88 |{item.foodName}
99 |101 | ${item.price}*{item.quantity} = ${item.quantity * item.price} 102 |
103 |107 | Total Amount 108 | ${order.totalAmount} 109 |
110 | 111 |112 | Order Status:{' '} 113 | {order.status} 114 |
115 |No order Found
52 |66 | Address: {order.deliveryInfo.address} 67 |
68 |69 | City: {order.deliveryInfo.city} 70 |
71 |72 | Total Amount: ${order.totalAmount} 73 |
74 | 75 | {order?.cartItems?.map((item: any, idx: number) => ( 76 |{item?.foodName}
87 |89 | ${item?.price}*{item?.quantity} = ${item?.quantity * item?.price} 90 |
91 |