import { PreloadedState, combineReducers, configureStore } from '@reduxjs/toolkit'; import fileListingReducer from './features/file-listing/fileListingSlice'; const rootReducer = combineReducers({ fileListing: fileListingReducer, }); export const setupStore = (preloadedState?: PreloadedState) => configureStore({ reducer: rootReducer, preloadedState, }); export type RootState = ReturnType; export type AppStore = ReturnType; export type AppDispatch = AppStore['dispatch'];