2022-08-03 17:42:22 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { recordEvent } from '@woocommerce/tracks';
|
|
|
|
import { useEffect } from '@wordpress/element';
|
2022-08-11 14:04:14 +00:00
|
|
|
import { Form } from '@woocommerce/components';
|
|
|
|
import { Product } from '@woocommerce/data';
|
2022-08-03 17:42:22 +00:00
|
|
|
|
2022-08-04 13:15:30 +00:00
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import { ProductFormLayout } from './layout/product-form-layout';
|
2022-08-11 14:04:14 +00:00
|
|
|
import { ProductFormActions } from './product-form-actions';
|
2022-08-04 13:15:30 +00:00
|
|
|
import { ProductDetailsSection } from './sections/product-details-section';
|
|
|
|
import { ProductImagesSection } from './sections/product-images-section';
|
2022-08-11 14:04:14 +00:00
|
|
|
import './product-page.scss';
|
2022-08-04 13:15:30 +00:00
|
|
|
|
|
|
|
const AddProductPage: React.FC = () => {
|
2022-08-03 17:42:22 +00:00
|
|
|
useEffect( () => {
|
|
|
|
recordEvent( 'view_new_product_management_experience' );
|
|
|
|
}, [] );
|
2022-08-11 14:04:14 +00:00
|
|
|
|
2022-08-03 17:42:22 +00:00
|
|
|
return (
|
|
|
|
<div className="woocommerce-add-product">
|
2022-08-11 14:04:14 +00:00
|
|
|
<Form< Partial< Product > > initialValues={ {} } errors={ {} }>
|
|
|
|
<ProductFormLayout>
|
|
|
|
<ProductDetailsSection />
|
|
|
|
|
|
|
|
<ProductFormActions />
|
|
|
|
</ProductFormLayout>
|
|
|
|
</Form>
|
2022-08-03 17:42:22 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
2022-08-04 13:15:30 +00:00
|
|
|
|
|
|
|
export default AddProductPage;
|