Add placeholder store for config
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
- [ ] Fix: Tooltips cause horizontal scroll on less-wide screens. Investigate.
|
||||
|
||||
- [ ] Move routing logic from `Home` into `Calculator`
|
||||
- [ ] Responsiveness:
|
||||
- [ ] Tooltips on mobile need different UX
|
||||
- [ ] Tooltips:
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
.calculator {
|
||||
animation: fadeIn .4s ease-out;
|
||||
|
||||
&__points {
|
||||
padding: 1em;
|
||||
color: white;
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export {}
|
||||
@@ -0,0 +1,14 @@
|
||||
import {
|
||||
ConfigState, ConfigActionTypes
|
||||
} from './types'
|
||||
|
||||
const initialState: ConfigState = {
|
||||
alwaysShowPoints: false
|
||||
}
|
||||
|
||||
export default function(state = initialState, action: ConfigActionTypes): ConfigState {
|
||||
switch (action.type) {
|
||||
default:
|
||||
return state
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
export interface ConfigState {
|
||||
alwaysShowPoints: boolean
|
||||
}
|
||||
|
||||
export const SET_CONFIG_VALUE = 'SET_CONFIG_VALUE'
|
||||
|
||||
interface SetConfigValueAction {
|
||||
type: typeof SET_CONFIG_VALUE
|
||||
key: string
|
||||
value: any
|
||||
}
|
||||
|
||||
export type ConfigActionTypes = SetConfigValueAction
|
||||
@@ -1,8 +1,10 @@
|
||||
import { createStore, combineReducers, compose } from 'redux'
|
||||
import calculator from './calculator/reducers'
|
||||
import config from './config/reducers'
|
||||
|
||||
const rootReducer = combineReducers({
|
||||
calculator,
|
||||
config
|
||||
})
|
||||
|
||||
export type AppState = ReturnType<typeof rootReducer>
|
||||
|
||||
@@ -13,7 +13,7 @@ const isSizeMissing = (icon) => (size): boolean => !fs.existsSync(getPath(icon,
|
||||
|
||||
const getIconNames = (): string[] => {
|
||||
return [
|
||||
// 'inv_misc_questionmark',
|
||||
'inv_misc_questionmark',
|
||||
...Object.values(spells).map(getIcon),
|
||||
...Object.values(classes).map(getIcon),
|
||||
...Object.values(talentsById).map(getIcon)
|
||||
|
||||
Reference in New Issue
Block a user