Skip to content

Commit

Permalink
export reducers state types as shared
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlewkowicz committed May 20, 2019
1 parent 450bdb6 commit d48d1a8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
4 changes: 3 additions & 1 deletion src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import { composeWithDevTools } from 'redux-devtools-extension';
import * as types from 'rpg-shared/dist/consts';

import npcDialog from './reducers/npcDialog';
import npcShop from './reducers/npcShop';

const rootReducer = combineReducers({
npcDialog
npcDialog,
npcShop
});

const composeEnhancers = composeWithDevTools({
Expand Down
9 changes: 1 addition & 8 deletions src/store/reducers/npcDialog.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import * as Actions from 'rpg-shared/action-types';
import { NPC_DIALOG_REQUEST, $_NPC_DIALOG_RESPONSE } from 'rpg-shared/dist/consts';
import { } from 'rpg-shared/objects';

export interface NpcDialogState {
data: any
opened: boolean
isLoading: boolean
step: number
}
import { NpcDialogState } from 'rpg-shared/store';

const initialState: NpcDialogState = {
data: null,
Expand Down
9 changes: 1 addition & 8 deletions src/store/reducers/npcShop.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import * as Actions from 'rpg-shared/action-types';
import { NPC_SHOP_TRADE, $_NPC_SHOP_RESPONSE, NPC_SHOP_REQUEST } from 'rpg-shared/dist/consts';
import { Item } from 'rpg-shared/objects';

export interface NpcShopState {
isLoading: boolean
opened: boolean
items: Item[]
buying: number[]
selling: number[]
}
import { NpcShopState } from 'rpg-shared/store';

const initialState: NpcShopState = {
isLoading: false,
Expand Down

0 comments on commit d48d1a8

Please sign in to comment.