Inventory tabs fix

This commit is contained in:
Batman 2021-04-22 02:55:02 -03:00
parent 3f64ecb644
commit e7bbdf179c
6 changed files with 9 additions and 9 deletions

View File

@ -15,7 +15,7 @@ export const InventoryView: FC<InventoryViewProps> = props =>
const [ isVisible, setIsVisible ] = useState(false); const [ isVisible, setIsVisible ] = useState(false);
const [ currentTab, setCurrentTab ] = useState<string>(null); const [ currentTab, setCurrentTab ] = useState<string>(null);
const [ tabs, setTabs ] = useState<string[]>([ const [ tabs, setTabs ] = useState<string[]>([
InventoryTabs.FURNITURE, InventoryTabs.BOTS, InventoryTabs.PETS, InventoryTabs.PETS InventoryTabs.FURNITURE, InventoryTabs.BOTS, InventoryTabs.PETS, InventoryTabs.BADGES
]); ]);
useEffect(() => { useEffect(() => {

View File

@ -13,10 +13,10 @@ export const InventoryTabsContentView: FC<InventoryTabsContentViewProps> = props
return ( return (
<div className="p-3"> <div className="p-3">
{ inventoryContext && inventoryContext.currentTab && inventoryContext.currentTab === InventoryTabs.FURNITURE } <InventoryTabFurnitureView /> { inventoryContext && inventoryContext.currentTab && inventoryContext.currentTab === InventoryTabs.FURNITURE && <InventoryTabFurnitureView /> }
{ inventoryContext && inventoryContext.currentTab && inventoryContext.currentTab === InventoryTabs.BOTS } <InventoryTabBotsView /> { inventoryContext && inventoryContext.currentTab && inventoryContext.currentTab === InventoryTabs.BOTS && <InventoryTabBotsView /> }
{ inventoryContext && inventoryContext.currentTab && inventoryContext.currentTab === InventoryTabs.PETS } <InventoryTabPetsView /> { inventoryContext && inventoryContext.currentTab && inventoryContext.currentTab === InventoryTabs.PETS && <InventoryTabPetsView /> }
{ inventoryContext && inventoryContext.currentTab && inventoryContext.currentTab === InventoryTabs.BADGES } <InventoryTabBadgesView /> { inventoryContext && inventoryContext.currentTab && inventoryContext.currentTab === InventoryTabs.BADGES && <InventoryTabBadgesView /> }
</div> </div>
); );
} }

View File

@ -7,6 +7,6 @@ export const InventoryTabBadgesView: FC<InventoryTabBadgesViewProps> = props =>
const inventoryContext = useContext(InventoryContext); const inventoryContext = useContext(InventoryContext);
return ( return (
<></> <>Badges content</>
); );
} }

View File

@ -7,6 +7,6 @@ export const InventoryTabBotsView: FC<InventoryTabBotsViewProps> = props =>
const inventoryContext = useContext(InventoryContext); const inventoryContext = useContext(InventoryContext);
return ( return (
<></> <>Bots content</>
); );
} }

View File

@ -7,6 +7,6 @@ export const InventoryTabFurnitureView: FC<InventoryTabFurnitureViewProps> = pro
const inventoryContext = useContext(InventoryContext); const inventoryContext = useContext(InventoryContext);
return ( return (
<></> <>Furniture content</>
); );
} }

View File

@ -7,6 +7,6 @@ export const InventoryTabPetsView: FC<InventoryTabPetsViewProps> = props =>
const inventoryContext = useContext(InventoryContext); const inventoryContext = useContext(InventoryContext);
return ( return (
<></> <>Pets content</>
); );
} }