initial commit

This commit is contained in:
2021-12-10 12:03:04 +00:00
commit c46c7ddbf0
3643 changed files with 582794 additions and 0 deletions

View File

@ -0,0 +1,23 @@
/**
* Internal dependencies
*/
import { CheckoutProvider } from '../checkout-provider';
/**
* Cart provider
* This wraps the Cart and provides an api interface for the Cart to
* children via various hooks.
*
* @param {Object} props Incoming props for the provider.
* @param {Object} [props.children] The children being wrapped.
* @param {string} [props.redirectUrl] Initialize what the cart will
* redirect to after successful
* submit.
*/
export const CartProvider = ( { children, redirectUrl } ) => {
return (
<CheckoutProvider isCart={ true } redirectUrl={ redirectUrl }>
{ children }
</CheckoutProvider>
);
};