diff --git a/components/auth/ForgotPassword.tsx b/components/auth/ForgotPassword.tsx index f6e342742..5450069f0 100644 --- a/components/auth/ForgotPassword.tsx +++ b/components/auth/ForgotPassword.tsx @@ -3,7 +3,7 @@ import { validate } from 'email-validator' import { Info } from '@components/icons' import { useUI } from '@components/ui/context' import { Logo, Button, Input } from '@components/ui' -import useSignup from '@bigcommerce/storefront-data-hooks/dist/use-signup' +import useSignup from '@bigcommerce/storefront-data-hooks/use-signup' interface Props {} diff --git a/components/auth/LoginView.tsx b/components/auth/LoginView.tsx index 33cb88c21..1ffd7fb1a 100644 --- a/components/auth/LoginView.tsx +++ b/components/auth/LoginView.tsx @@ -1,6 +1,6 @@ import { FC, useEffect, useState, useCallback } from 'react' import { Logo, Modal, Button, Input } from '@components/ui' -import useLogin from '@bigcommerce/storefront-data-hooks/dist/use-login' +import useLogin from '@bigcommerce/storefront-data-hooks/use-login' import { useUI } from '@components/ui/context' import { validate } from 'email-validator' diff --git a/components/auth/SignUpView.tsx b/components/auth/SignUpView.tsx index f0cfa8458..b1b2fef45 100644 --- a/components/auth/SignUpView.tsx +++ b/components/auth/SignUpView.tsx @@ -3,7 +3,7 @@ import { validate } from 'email-validator' import { Info } from '@components/icons' import { useUI } from '@components/ui/context' import { Logo, Button, Input } from '@components/ui' -import useSignup from '@bigcommerce/storefront-data-hooks/dist/use-signup' +import useSignup from '@bigcommerce/storefront-data-hooks/use-signup' interface Props {} diff --git a/components/cart/CartItem/CartItem.tsx b/components/cart/CartItem/CartItem.tsx index 0a6062545..61906960f 100644 --- a/components/cart/CartItem/CartItem.tsx +++ b/components/cart/CartItem/CartItem.tsx @@ -3,9 +3,9 @@ import Image from 'next/image' import Link from 'next/link' import { ChangeEvent, useEffect, useState } from 'react' import { Trash, Plus, Minus } from '@components/icons' -import usePrice from '@bigcommerce/storefront-data-hooks/dist/use-price' -import useUpdateItem from '@bigcommerce/storefront-data-hooks/dist/cart/use-update-item' -import useRemoveItem from '@bigcommerce/storefront-data-hooks/dist/cart/use-remove-item' +import usePrice from '@bigcommerce/storefront-data-hooks/use-price' +import useUpdateItem from '@bigcommerce/storefront-data-hooks/cart/use-update-item' +import useRemoveItem from '@bigcommerce/storefront-data-hooks/cart/use-remove-item' const CartItem = ({ item, diff --git a/components/cart/CartSidebarView/CartSidebarView.tsx b/components/cart/CartSidebarView/CartSidebarView.tsx index 8f019494b..6a1abcfc8 100644 --- a/components/cart/CartSidebarView/CartSidebarView.tsx +++ b/components/cart/CartSidebarView/CartSidebarView.tsx @@ -4,8 +4,8 @@ import { UserNav } from '@components/core' import { Button } from '@components/ui' import { ArrowLeft, Bag, Cross, Check } from '@components/icons' import { useUI } from '@components/ui/context' -import useCart from '@bigcommerce/storefront-data-hooks/dist/cart/use-cart' -import usePrice from '@bigcommerce/storefront-data-hooks/dist/use-price' +import useCart from '@bigcommerce/storefront-data-hooks/cart/use-cart' +import usePrice from '@bigcommerce/storefront-data-hooks/use-price' import CartItem from '../CartItem' import s from './CartSidebarView.module.css' diff --git a/components/core/Footer/Footer.tsx b/components/core/Footer/Footer.tsx index 419de5ccc..968ebecb1 100644 --- a/components/core/Footer/Footer.tsx +++ b/components/core/Footer/Footer.tsx @@ -2,7 +2,7 @@ import { FC } from 'react' import cn from 'classnames' import Link from 'next/link' import { useRouter } from 'next/router' -import type { Page } from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-all-pages' +import type { Page } from '@bigcommerce/storefront-data-hooks/api/operations/get-all-pages' import getSlug from '@utils/get-slug' import { Github } from '@components/icons' import { Logo, Container } from '@components/ui' diff --git a/components/core/Layout/Layout.tsx b/components/core/Layout/Layout.tsx index 392844c10..9ac0a74ed 100644 --- a/components/core/Layout/Layout.tsx +++ b/components/core/Layout/Layout.tsx @@ -1,8 +1,8 @@ import { FC, useCallback, useEffect, useState } from 'react' import cn from 'classnames' import { useRouter } from 'next/router' -import type { Page } from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-all-pages' -import { CommerceProvider } from '@bigcommerce/storefront-data-hooks/dist' +import type { Page } from '@bigcommerce/storefront-data-hooks/api/operations/get-all-pages' +import { CommerceProvider } from '@bigcommerce/storefront-data-hooks' import { CartSidebarView } from '@components/cart' import { Container, Sidebar, Button, Modal, Toast } from '@components/ui' import { Navbar, Featurebar, Footer } from '@components/core' diff --git a/components/core/UserNav/DropdownMenu.tsx b/components/core/UserNav/DropdownMenu.tsx index 2d4ccf8b8..c950f60cb 100644 --- a/components/core/UserNav/DropdownMenu.tsx +++ b/components/core/UserNav/DropdownMenu.tsx @@ -5,7 +5,7 @@ import cn from 'classnames' import s from './DropdownMenu.module.css' import { Moon, Sun } from '@components/icons' import { Menu, Transition } from '@headlessui/react' -import useLogout from '@bigcommerce/storefront-data-hooks/dist/use-logout' +import useLogout from '@bigcommerce/storefront-data-hooks/use-logout' import { useRouter } from 'next/router' interface DropdownMenuProps { diff --git a/components/core/UserNav/UserNav.tsx b/components/core/UserNav/UserNav.tsx index ab5ea9da1..cb8ffeaec 100644 --- a/components/core/UserNav/UserNav.tsx +++ b/components/core/UserNav/UserNav.tsx @@ -7,8 +7,8 @@ import { Avatar } from '@components/core' import { useUI } from '@components/ui/context' import DropdownMenu from './DropdownMenu' import { Menu } from '@headlessui/react' -import useCart from '@bigcommerce/storefront-data-hooks/dist/cart/use-cart' -import useCustomer from '@bigcommerce/storefront-data-hooks/dist/use-customer' +import useCart from '@bigcommerce/storefront-data-hooks/cart/use-cart' +import useCustomer from '@bigcommerce/storefront-data-hooks/use-customer' interface Props { className?: string } diff --git a/components/product/ProductCard/ProductCard.tsx b/components/product/ProductCard/ProductCard.tsx index 345c31177..80d6c8f00 100644 --- a/components/product/ProductCard/ProductCard.tsx +++ b/components/product/ProductCard/ProductCard.tsx @@ -1,8 +1,8 @@ import type { FC } from 'react' import cn from 'classnames' import Link from 'next/link' -import type { ProductNode } from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-all-products' -import usePrice from '@bigcommerce/storefront-data-hooks/dist/use-price' +import type { ProductNode } from '@bigcommerce/storefront-data-hooks/api/operations/get-all-products' +import usePrice from '@bigcommerce/storefront-data-hooks/use-price' import { EnhancedImage } from '@components/core' import s from './ProductCard.module.css' import WishlistButton from '@components/wishlist/WishlistButton' diff --git a/components/product/ProductView/ProductView.tsx b/components/product/ProductView/ProductView.tsx index d795c92cc..0530fb186 100644 --- a/components/product/ProductView/ProductView.tsx +++ b/components/product/ProductView/ProductView.tsx @@ -10,8 +10,8 @@ import { Swatch, ProductSlider } from '@components/product' import { Button, Container } from '@components/ui' import { HTMLContent } from '@components/core' -import useAddItem from '@bigcommerce/storefront-data-hooks/dist/cart/use-add-item' -import type { ProductNode } from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-product' +import useAddItem from '@bigcommerce/storefront-data-hooks/cart/use-add-item' +import type { ProductNode } from '@bigcommerce/storefront-data-hooks/api/operations/get-product' import { getProductOptions } from '../helpers' interface Props { diff --git a/components/product/helpers.ts b/components/product/helpers.ts index f9e69f954..9b89bb3db 100644 --- a/components/product/helpers.ts +++ b/components/product/helpers.ts @@ -1,4 +1,4 @@ -import type { ProductNode } from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-product' +import type { ProductNode } from '@bigcommerce/storefront-data-hooks/api/operations/get-product' export function getProductOptions(product: ProductNode) { const options = product.productOptions.edges?.map(({ node }: any) => ({ diff --git a/components/wishlist/WishlistButton/WishlistButton.tsx b/components/wishlist/WishlistButton/WishlistButton.tsx index 584fba8c7..084007e88 100644 --- a/components/wishlist/WishlistButton/WishlistButton.tsx +++ b/components/wishlist/WishlistButton/WishlistButton.tsx @@ -1,10 +1,10 @@ import React, { FC, useState } from 'react' import cn from 'classnames' -import type { ProductNode } from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-all-products' -import useAddItem from '@bigcommerce/storefront-data-hooks/dist/wishlist/use-add-item' -import useRemoveItem from '@bigcommerce/storefront-data-hooks/dist/wishlist/use-remove-item' -import useWishlist from '@bigcommerce/storefront-data-hooks/dist/wishlist/use-wishlist' -import useCustomer from '@bigcommerce/storefront-data-hooks/dist/use-customer' +import type { ProductNode } from '@bigcommerce/storefront-data-hooks/api/operations/get-all-products' +import useAddItem from '@bigcommerce/storefront-data-hooks/wishlist/use-add-item' +import useRemoveItem from '@bigcommerce/storefront-data-hooks/wishlist/use-remove-item' +import useWishlist from '@bigcommerce/storefront-data-hooks/wishlist/use-wishlist' +import useCustomer from '@bigcommerce/storefront-data-hooks/use-customer' import { Heart } from '@components/icons' import { useUI } from '@components/ui/context' diff --git a/pages/[...pages].tsx b/pages/[...pages].tsx index 0d1e14fbd..787c72ee4 100644 --- a/pages/[...pages].tsx +++ b/pages/[...pages].tsx @@ -1,7 +1,7 @@ import { GetStaticPropsContext, InferGetStaticPropsType } from 'next' import getSlug from '@utils/get-slug' -import getPage from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-page' -import getAllPages from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-all-pages' +import getPage from '@bigcommerce/storefront-data-hooks/api/operations/get-page' +import getAllPages from '@bigcommerce/storefront-data-hooks/api/operations/get-all-pages' import { Layout, HTMLContent } from '@components/core' export async function getStaticProps({ diff --git a/pages/api/bigcommerce/cart.ts b/pages/api/bigcommerce/cart.ts index 58b49da74..bbd70db52 100644 --- a/pages/api/bigcommerce/cart.ts +++ b/pages/api/bigcommerce/cart.ts @@ -1,3 +1,3 @@ -import cartApi from '@bigcommerce/storefront-data-hooks/dist/api/cart' +import cartApi from '@bigcommerce/storefront-data-hooks/api/cart' export default cartApi() diff --git a/pages/api/bigcommerce/catalog/products.ts b/pages/api/bigcommerce/catalog/products.ts index 9ff8fbdaa..7ba267ec1 100644 --- a/pages/api/bigcommerce/catalog/products.ts +++ b/pages/api/bigcommerce/catalog/products.ts @@ -1,3 +1,3 @@ -import catalogProductsApi from '@bigcommerce/storefront-data-hooks/dist/api/catalog/products' +import catalogProductsApi from '@bigcommerce/storefront-data-hooks/api/catalog/products' export default catalogProductsApi() diff --git a/pages/api/bigcommerce/checkout.ts b/pages/api/bigcommerce/checkout.ts index f8b1aa924..6895076b6 100644 --- a/pages/api/bigcommerce/checkout.ts +++ b/pages/api/bigcommerce/checkout.ts @@ -1,3 +1,3 @@ -import checkoutApi from '@bigcommerce/storefront-data-hooks/dist/api/checkout' +import checkoutApi from '@bigcommerce/storefront-data-hooks/api/checkout' export default checkoutApi() diff --git a/pages/api/bigcommerce/customers/index.ts b/pages/api/bigcommerce/customers/index.ts index e349b8292..21f53dbdc 100644 --- a/pages/api/bigcommerce/customers/index.ts +++ b/pages/api/bigcommerce/customers/index.ts @@ -1,3 +1,3 @@ -import customersApi from '@bigcommerce/storefront-data-hooks/dist/api/customers' +import customersApi from '@bigcommerce/storefront-data-hooks/api/customers' export default customersApi() diff --git a/pages/api/bigcommerce/customers/login.ts b/pages/api/bigcommerce/customers/login.ts index 581324491..44aec1f7f 100644 --- a/pages/api/bigcommerce/customers/login.ts +++ b/pages/api/bigcommerce/customers/login.ts @@ -1,3 +1,3 @@ -import loginApi from '@bigcommerce/storefront-data-hooks/dist/api/customers/login' +import loginApi from '@bigcommerce/storefront-data-hooks/api/customers/login' export default loginApi() diff --git a/pages/api/bigcommerce/customers/logout.ts b/pages/api/bigcommerce/customers/logout.ts index 4d3da0d6e..29cc21063 100644 --- a/pages/api/bigcommerce/customers/logout.ts +++ b/pages/api/bigcommerce/customers/logout.ts @@ -1,3 +1,3 @@ -import logoutApi from '@bigcommerce/storefront-data-hooks/dist/api/customers/logout' +import logoutApi from '@bigcommerce/storefront-data-hooks/api/customers/logout' export default logoutApi() diff --git a/pages/api/bigcommerce/customers/signup.ts b/pages/api/bigcommerce/customers/signup.ts index c7ba5db21..9ce5c889b 100644 --- a/pages/api/bigcommerce/customers/signup.ts +++ b/pages/api/bigcommerce/customers/signup.ts @@ -1,3 +1,3 @@ -import signupApi from '@bigcommerce/storefront-data-hooks/dist/api/customers/signup' +import signupApi from '@bigcommerce/storefront-data-hooks/api/customers/signup' export default signupApi() diff --git a/pages/api/bigcommerce/wishlist.ts b/pages/api/bigcommerce/wishlist.ts index b361c87b2..d918c4bf1 100644 --- a/pages/api/bigcommerce/wishlist.ts +++ b/pages/api/bigcommerce/wishlist.ts @@ -1,3 +1,3 @@ -import wishlistApi from '@bigcommerce/storefront-data-hooks/dist/api/wishlist' +import wishlistApi from '@bigcommerce/storefront-data-hooks/api/wishlist' export default wishlistApi() diff --git a/pages/blog.tsx b/pages/blog.tsx index 22c8ebf59..2ba94b109 100644 --- a/pages/blog.tsx +++ b/pages/blog.tsx @@ -1,5 +1,5 @@ import { GetStaticPropsContext, InferGetStaticPropsType } from 'next' -import getAllPages from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-all-pages' +import getAllPages from '@bigcommerce/storefront-data-hooks/api/operations/get-all-pages' import { Layout } from '@components/core' import { Container } from '@components/ui' diff --git a/pages/cart.tsx b/pages/cart.tsx index 515060369..00b2a5cb1 100644 --- a/pages/cart.tsx +++ b/pages/cart.tsx @@ -1,10 +1,10 @@ import { GetStaticPropsContext, InferGetStaticPropsType } from 'next' -import getAllPages from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-all-pages' +import getAllPages from '@bigcommerce/storefront-data-hooks/api/operations/get-all-pages' import { Layout } from '@components/core' import { Button } from '@components/ui' import { Bag, Cross, Check } from '@components/icons' -import useCart from '@bigcommerce/storefront-data-hooks/dist/cart/use-cart' -import usePrice from '@bigcommerce/storefront-data-hooks/dist/use-price' +import useCart from '@bigcommerce/storefront-data-hooks/cart/use-cart' +import usePrice from '@bigcommerce/storefront-data-hooks/use-price' import { CartItem } from '@components/cart' import { Text } from '@components/ui' diff --git a/pages/index.tsx b/pages/index.tsx index dc3f97679..b76361d78 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,9 +1,9 @@ import { useMemo } from 'react' import { GetStaticPropsContext, InferGetStaticPropsType } from 'next' -import { getConfig } from '@bigcommerce/storefront-data-hooks/dist/api' -import getAllProducts from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-all-products' -import getSiteInfo from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-site-info' -import getAllPages from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-all-pages' +import { getConfig } from '@bigcommerce/storefront-data-hooks/api' +import getAllProducts from '@bigcommerce/storefront-data-hooks/api/operations/get-all-products' +import getSiteInfo from '@bigcommerce/storefront-data-hooks/api/operations/get-site-info' +import getAllPages from '@bigcommerce/storefront-data-hooks/api/operations/get-all-pages' import rangeMap from '@lib/range-map' import { Layout } from '@components/core' import { Grid, Marquee, Hero } from '@components/ui' diff --git a/pages/product/[slug].tsx b/pages/product/[slug].tsx index b4dd65d56..e42d53d4d 100644 --- a/pages/product/[slug].tsx +++ b/pages/product/[slug].tsx @@ -4,12 +4,12 @@ import { InferGetStaticPropsType, } from 'next' import { useRouter } from 'next/router' -import { getConfig } from '@bigcommerce/storefront-data-hooks/dist/api' -import getAllPages from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-all-pages' -import getProduct from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-product' +import { getConfig } from '@bigcommerce/storefront-data-hooks/api' +import getAllPages from '@bigcommerce/storefront-data-hooks/api/operations/get-all-pages' +import getProduct from '@bigcommerce/storefront-data-hooks/api/operations/get-product' import { Layout } from '@components/core' import { ProductView } from '@components/product' -import getAllProductPaths from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-all-product-paths' +import getAllProductPaths from '@bigcommerce/storefront-data-hooks/api/operations/get-all-product-paths' export async function getStaticProps({ params, diff --git a/pages/profile.tsx b/pages/profile.tsx index 4dcb39bd7..3c52f5fee 100644 --- a/pages/profile.tsx +++ b/pages/profile.tsx @@ -1,6 +1,6 @@ import { Layout } from '@components/core' import { Container, Text } from '@components/ui' -import useCustomer from '@bigcommerce/storefront-data-hooks/dist/use-customer' +import useCustomer from '@bigcommerce/storefront-data-hooks/use-customer' export default function Profile() { const { data } = useCustomer() console.log(data) diff --git a/pages/search.tsx b/pages/search.tsx index 5dcf94883..1bc672fbf 100644 --- a/pages/search.tsx +++ b/pages/search.tsx @@ -5,9 +5,9 @@ import { useRouter } from 'next/router' import { Layout } from '@components/core' import { ProductCard } from '@components/product' import { Container, Grid, Skeleton } from '@components/ui' -import useSearch from '@bigcommerce/storefront-data-hooks/dist/products/use-search' -import getAllPages from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-all-pages' -import getSiteInfo from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-site-info' +import useSearch from '@bigcommerce/storefront-data-hooks/products/use-search' +import getAllPages from '@bigcommerce/storefront-data-hooks/api/operations/get-all-pages' +import getSiteInfo from '@bigcommerce/storefront-data-hooks/api/operations/get-site-info' import rangeMap from '@lib/range-map' import getSlug from '@utils/get-slug' import { diff --git a/pages/wishlist.tsx b/pages/wishlist.tsx index fb24adaa5..ab76c0c85 100644 --- a/pages/wishlist.tsx +++ b/pages/wishlist.tsx @@ -1,11 +1,11 @@ import { GetStaticPropsContext, InferGetStaticPropsType } from 'next' -import getAllPages from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-all-pages' +import getAllPages from '@bigcommerce/storefront-data-hooks/api/operations/get-all-pages' import { Layout } from '@components/core' import { Container, Text } from '@components/ui' import { WishlistCard } from '@components/wishlist' -import getSiteInfo from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-site-info' -import useWishlist from '@bigcommerce/storefront-data-hooks/dist/wishlist/use-wishlist' +import getSiteInfo from '@bigcommerce/storefront-data-hooks/api/operations/get-site-info' +import useWishlist from '@bigcommerce/storefront-data-hooks/wishlist/use-wishlist' export async function getStaticProps({ preview }: GetStaticPropsContext) { const { pages } = await getAllPages()