Reordering

This commit is contained in:
Belen Curcio
2021-01-07 16:49:26 -03:00
parent c780852fbb
commit 4499f33f13
27 changed files with 52 additions and 28 deletions

View File

@@ -0,0 +1,3 @@
export { default as useLogin } from './use-login'
export { default as useLogout } from './use-logout'
export { default as useSignup } from './use-signup'

View File

@@ -2,8 +2,8 @@ import { useCallback } from 'react'
import type { HookFetcher } from '@commerce/utils/types'
import { CommerceError } from '@commerce/utils/errors'
import useCommerceLogin from '@commerce/use-login'
import type { LoginBody } from './api/customers/login'
import useCustomer from './use-customer'
import type { LoginBody } from '../api/customers/login'
import useCustomer from '../customer/use-customer'
const defaultOpts = {
url: '/api/bigcommerce/customers/login',

View File

@@ -1,7 +1,7 @@
import { useCallback } from 'react'
import type { HookFetcher } from '@commerce/utils/types'
import useCommerceLogout from '@commerce/use-logout'
import useCustomer from './use-customer'
import useCustomer from '../customer/use-customer'
const defaultOpts = {
url: '/api/bigcommerce/customers/logout',

View File

@@ -2,8 +2,8 @@ import { useCallback } from 'react'
import type { HookFetcher } from '@commerce/utils/types'
import { CommerceError } from '@commerce/utils/errors'
import useCommerceSignup from '@commerce/use-signup'
import type { SignupBody } from './api/customers/signup'
import useCustomer from './use-customer'
import type { SignupBody } from '../api/customers/signup'
import useCustomer from '../customer/use-customer'
const defaultOpts = {
url: '/api/bigcommerce/customers/signup',

View File

@@ -0,0 +1,5 @@
export { default as useCart } from './use-cart'
export { default as useAddItem } from './use-add-item'
export { default as useRemoveItem } from './use-remove-item'
export { default as useWishlistActions } from './use-cart-actions'
export { default as useUpdateItem } from './use-cart-actions'

View File

@@ -0,0 +1 @@
export { default as useCustomer } from './use-customer'

View File

@@ -1,7 +1,7 @@
import type { HookFetcher } from '@commerce/utils/types'
import type { SwrOptions } from '@commerce/utils/use-data'
import useCommerceCustomer from '@commerce/use-customer'
import type { Customer, CustomerData } from './api/customers'
import type { Customer, CustomerData } from '../api/customers'
const defaultOpts = {
url: '/api/bigcommerce/customers',

View File

@@ -0,0 +1,2 @@
export { default as usePrice } from './use-price'
export { default as useSearch } from './use-search'

View File

@@ -3,7 +3,7 @@ import { HookFetcher } from '@commerce/utils/types'
import { CommerceError } from '@commerce/utils/errors'
import useWishlistAddItem from '@commerce/wishlist/use-add-item'
import type { ItemBody, AddItemBody } from '../api/wishlist'
import useCustomer from '../use-customer'
import useCustomer from '../customer/use-customer'
import useWishlist, { UseWishlistOptions, Wishlist } from './use-wishlist'
const defaultOpts = {

View File

@@ -3,7 +3,7 @@ import { HookFetcher } from '@commerce/utils/types'
import { CommerceError } from '@commerce/utils/errors'
import useWishlistRemoveItem from '@commerce/wishlist/use-remove-item'
import type { RemoveItemBody } from '../api/wishlist'
import useCustomer from '../use-customer'
import useCustomer from '../customer/use-customer'
import useWishlist, { UseWishlistOptions, Wishlist } from './use-wishlist'
const defaultOpts = {

View File

@@ -2,7 +2,7 @@ import { HookFetcher } from '@commerce/utils/types'
import { SwrOptions } from '@commerce/utils/use-data'
import useCommerceWishlist from '@commerce/wishlist/use-wishlist'
import type { Wishlist } from '../api/wishlist'
import useCustomer from '../use-customer'
import useCustomer from '../customer/use-customer'
const defaultOpts = {
url: '/api/bigcommerce/wishlist',