diff --git a/src/views/inventory/InventoryView.tsx b/src/views/inventory/InventoryView.tsx index 5c75460e..630abf4a 100644 --- a/src/views/inventory/InventoryView.tsx +++ b/src/views/inventory/InventoryView.tsx @@ -11,10 +11,10 @@ import { LocalizeText } from '../../utils/LocalizeText'; import { InventoryContextProvider } from './context/InventoryContext'; import { InventoryMessageHandler } from './InventoryMessageHandler'; import { InventoryTabs, InventoryViewProps } from './InventoryView.types'; -import { initialInventoryBadge, inventoryBadgeReducer } from './reducers/InventoryBadgeReducer'; -import { initialInventoryBot, inventoryBotReducer } from './reducers/InventoryBotReducer'; -import { initialInventoryFurniture, inventoryFurnitureReducer } from './reducers/InventoryFurnitureReducer'; -import { initialInventoryPet, inventoryPetReducer } from './reducers/InventoryPetReducer'; +import { initialInventoryBadge, InventoryBadgeReducer } from './reducers/InventoryBadgeReducer'; +import { initialInventoryBot, InventoryBotReducer } from './reducers/InventoryBotReducer'; +import { initialInventoryFurniture, InventoryFurnitureReducer } from './reducers/InventoryFurnitureReducer'; +import { initialInventoryPet, InventoryPetReducer } from './reducers/InventoryPetReducer'; import { isObjectMoverRequested, setObjectMoverRequested } from './utils/InventoryUtilities'; import { InventoryBadgeView } from './views/badge/InventoryBadgeView'; import { InventoryBotView } from './views/bot/InventoryBotView'; @@ -29,10 +29,10 @@ export const InventoryView: FC = props => const [ currentTab, setCurrentTab ] = useState(tabs[0]); const [ roomSession, setRoomSession ] = useState(null); const [ roomPreviewer, setRoomPreviewer ] = useState(null); - const [ furnitureState, dispatchFurnitureState ] = useReducer(inventoryFurnitureReducer, initialInventoryFurniture); - const [ botState, dispatchBotState ] = useReducer(inventoryBotReducer, initialInventoryBot); - const [ petState, dispatchPetState ] = useReducer(inventoryPetReducer, initialInventoryPet); - const [ badgeState, dispatchBadgeState ] = useReducer(inventoryBadgeReducer, initialInventoryBadge); + const [ furnitureState, dispatchFurnitureState ] = useReducer(InventoryFurnitureReducer, initialInventoryFurniture); + const [ botState, dispatchBotState ] = useReducer(InventoryBotReducer, initialInventoryBot); + const [ petState, dispatchPetState ] = useReducer(InventoryPetReducer, initialInventoryPet); + const [ badgeState, dispatchBadgeState ] = useReducer(InventoryBadgeReducer, initialInventoryBadge); const onInventoryEvent = useCallback((event: InventoryEvent) => { @@ -97,11 +97,6 @@ export const InventoryView: FC = props => } }, []); - function hideInventory(): void - { - setIsVisible(false); - } - return ( @@ -111,7 +106,7 @@ export const InventoryView: FC = props =>
{ LocalizeText('inventory.title') }
-
+
setIsVisible(false) }>
diff --git a/src/views/inventory/reducers/InventoryBadgeReducer.tsx b/src/views/inventory/reducers/InventoryBadgeReducer.tsx index aa92a35a..912d9375 100644 --- a/src/views/inventory/reducers/InventoryBadgeReducer.tsx +++ b/src/views/inventory/reducers/InventoryBadgeReducer.tsx @@ -37,7 +37,7 @@ export const initialInventoryBadge: IInventoryBadgeState = { activeBadges: [] } -export const inventoryBadgeReducer: Reducer = (state, action) => +export const InventoryBadgeReducer: Reducer = (state, action) => { switch(action.type) { diff --git a/src/views/inventory/reducers/InventoryBotReducer.tsx b/src/views/inventory/reducers/InventoryBotReducer.tsx index b3a8c369..44e5a839 100644 --- a/src/views/inventory/reducers/InventoryBotReducer.tsx +++ b/src/views/inventory/reducers/InventoryBotReducer.tsx @@ -37,7 +37,7 @@ export const initialInventoryBot: IInventoryBotState = { botItems: [] } -export const inventoryBotReducer: Reducer = (state, action) => +export const InventoryBotReducer: Reducer = (state, action) => { switch(action.type) { diff --git a/src/views/inventory/reducers/InventoryFurnitureReducer.tsx b/src/views/inventory/reducers/InventoryFurnitureReducer.tsx index 9ef8e67a..b44d250d 100644 --- a/src/views/inventory/reducers/InventoryFurnitureReducer.tsx +++ b/src/views/inventory/reducers/InventoryFurnitureReducer.tsx @@ -38,7 +38,7 @@ export const initialInventoryFurniture: IInventoryFurnitureState = { groupItems: [] } -export const inventoryFurnitureReducer: Reducer = (state, action) => +export const InventoryFurnitureReducer: Reducer = (state, action) => { switch(action.type) { diff --git a/src/views/inventory/reducers/InventoryPetReducer.tsx b/src/views/inventory/reducers/InventoryPetReducer.tsx index 93269c0c..7f6e1e7c 100644 --- a/src/views/inventory/reducers/InventoryPetReducer.tsx +++ b/src/views/inventory/reducers/InventoryPetReducer.tsx @@ -37,7 +37,7 @@ export const initialInventoryPet: IInventoryPetState = { petItems: [] } -export const inventoryPetReducer: Reducer = (state, action) => +export const InventoryPetReducer: Reducer = (state, action) => { switch(action.type) {