You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
677 B
27 lines
677 B
import { QueryWindowReducer, QueryWindowState } from "./QueryWindow"; |
|
import { EditArtistWindowReducer, EditArtistWindowState } from "./EditArtistWindow"; |
|
|
|
export enum WindowType { |
|
Query = "Query", |
|
EditArtist = "EditArtist", |
|
} |
|
|
|
export type WindowState = QueryWindowState | EditArtistWindowState; |
|
|
|
export const newWindowReducer = { |
|
[WindowType.Query]: QueryWindowReducer, |
|
[WindowType.EditArtist]: EditArtistWindowReducer, |
|
} |
|
|
|
export const newWindowState = { |
|
[WindowType.Query]: () => { |
|
return { |
|
editingQuery: false, |
|
query: null, |
|
resultsForQuery: null, |
|
}; |
|
}, |
|
[WindowType.EditArtist]: () => { |
|
|
|
} |
|
} |