2023-07-20 13:53:06 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { useState } from '@wordpress/element';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import './marketplace.scss';
|
|
|
|
import { DEFAULT_TAB_KEY } from './components/constants';
|
2023-07-26 11:31:59 +00:00
|
|
|
import Header from './components/header/header';
|
2023-07-20 13:53:06 +00:00
|
|
|
import Content from './components/content/content';
|
2023-08-10 07:16:56 +00:00
|
|
|
import { ProductListContextProvider } from './contexts/product-list-context';
|
2023-07-20 13:53:06 +00:00
|
|
|
|
|
|
|
export default function Marketplace() {
|
|
|
|
const [ selectedTab, setSelectedTab ] = useState( DEFAULT_TAB_KEY );
|
|
|
|
|
|
|
|
return (
|
2023-08-10 07:16:56 +00:00
|
|
|
<ProductListContextProvider>
|
|
|
|
<div className="woocommerce-marketplace">
|
|
|
|
<Header
|
|
|
|
selectedTab={ selectedTab }
|
|
|
|
setSelectedTab={ setSelectedTab }
|
|
|
|
/>
|
|
|
|
<Content selectedTab={ selectedTab } />
|
|
|
|
</div>
|
|
|
|
</ProductListContextProvider>
|
2023-07-20 13:53:06 +00:00
|
|
|
);
|
|
|
|
}
|