This repository has been archived on 2022-09-16. You can view files and clone it, but cannot push or open issues/pull-requests.
2020-03-27 22:23:31 +00:00
|
|
|
import { createStore, combineReducers } from "redux";
|
|
|
|
|
|
|
|
import { MusicState } from "./music/types";
|
|
|
|
import { musicStateReducer } from "./music/reducers";
|
|
|
|
|
|
|
|
export interface State {
|
2021-04-07 23:23:21 +01:00
|
|
|
musicState: MusicState;
|
2020-03-27 22:23:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const rootReducer = combineReducers<State>({
|
2021-04-07 23:23:21 +01:00
|
|
|
musicState: musicStateReducer,
|
2020-03-27 22:23:31 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
export const store = createStore(
|
2021-04-07 23:23:21 +01:00
|
|
|
rootReducer,
|
2022-08-03 01:48:06 +01:00
|
|
|
// @ts-expect-error - These properties are set by the devtools extension
|
2021-04-07 23:23:21 +01:00
|
|
|
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
|
2020-03-27 22:23:31 +00:00
|
|
|
);
|
2021-04-07 23:14:42 +01:00
|
|
|
|
|
|
|
export type Dispatch = typeof store.dispatch;
|