remake app ohome setup /notworking
This commit is contained in:
20
src/pages/groceryList/GroceryListPage.js
Normal file
20
src/pages/groceryList/GroceryListPage.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import React, { useState } from 'react'
|
||||
//components
|
||||
import TabMenu from '../../components/GroceryList/TabMenu'
|
||||
import Groceries from './storageManagement/Groceries'
|
||||
import Products from './storageManagement/Products'
|
||||
//styling
|
||||
import { WrapperGroceryPage } from './styles/GroceryListPage'
|
||||
|
||||
const GroceryListPage = () => {
|
||||
const [currentTab, setCurrentTab] = useState("Groceries")
|
||||
return (
|
||||
<WrapperGroceryPage>
|
||||
{
|
||||
currentTab === "Groceries" ? <Groceries /> : <Products />
|
||||
}
|
||||
<TabMenu currentTab={currentTab} setCurrentTab={setCurrentTab} />
|
||||
</WrapperGroceryPage>
|
||||
)
|
||||
}
|
||||
export default GroceryListPage
|
||||
Reference in New Issue
Block a user