diff --git a/lib/bigcommerce/api/index.ts b/lib/bigcommerce/api/index.ts index 78215d4d6..545d8590d 100644 --- a/lib/bigcommerce/api/index.ts +++ b/lib/bigcommerce/api/index.ts @@ -10,6 +10,7 @@ export interface BigcommerceConfig extends CommerceAPIConfig { storeApiUrl: string storeApiToken: string storeApiClientId: string + storeChannelId?: string storeApiFetch(endpoint: string, options?: RequestInit): Promise } @@ -18,6 +19,7 @@ const API_TOKEN = process.env.BIGCOMMERCE_STOREFRONT_API_TOKEN const STORE_API_URL = process.env.BIGCOMMERCE_STORE_API_URL const STORE_API_TOKEN = process.env.BIGCOMMERCE_STORE_API_TOKEN const STORE_API_CLIENT_ID = process.env.BIGCOMMERCE_STORE_API_CLIENT_ID +const STORE_CHANNEL_ID = process.env.BIGCOMMERCE_CHANNEL_ID if (!API_URL) { throw new Error( @@ -73,6 +75,7 @@ const config = new Config({ storeApiUrl: STORE_API_URL, storeApiToken: STORE_API_TOKEN, storeApiClientId: STORE_API_CLIENT_ID, + storeChannelId: STORE_CHANNEL_ID, storeApiFetch: fetchStoreApi, }) diff --git a/pages/profile.tsx b/pages/profile.tsx index c34161360..3d657a525 100644 --- a/pages/profile.tsx +++ b/pages/profile.tsx @@ -1,9 +1,9 @@ import { Layout } from '@components/core' import { Container, Text } from '@components/ui' import useCustomer from '@lib/bigcommerce/use-customer' + export default function Profile() { const { data } = useCustomer() - console.log(data) return ( My Profile