refactor: migrate project to TypeScript and translate comments to English
Build & Deploy (develop) / build-and-deploy (push) Successful in 2m23s
Build & Deploy (develop) / build-and-deploy (push) Successful in 2m23s
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { configureStore } from '@reduxjs/toolkit';
|
||||
import cartReducer from './cartSlice';
|
||||
|
||||
export const makeStore = () =>
|
||||
configureStore({
|
||||
reducer: {
|
||||
cart: cartReducer,
|
||||
},
|
||||
});
|
||||
|
||||
// Singleton store for the client (App Router renders providers on the client tree).
|
||||
export const store = makeStore();
|
||||
|
||||
export type AppStore = ReturnType<typeof makeStore>;
|
||||
export type RootState = ReturnType<AppStore["getState"]>;
|
||||
export type AppDispatch = AppStore["dispatch"];
|
||||
Reference in New Issue
Block a user