Add channel id to config
This commit is contained in:
		@@ -10,6 +10,7 @@ export interface BigcommerceConfig extends CommerceAPIConfig {
 | 
			
		||||
  storeApiUrl: string
 | 
			
		||||
  storeApiToken: string
 | 
			
		||||
  storeApiClientId: string
 | 
			
		||||
  storeChannelId?: string
 | 
			
		||||
  storeApiFetch<T>(endpoint: string, options?: RequestInit): Promise<T>
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -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,
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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 (
 | 
			
		||||
    <Container>
 | 
			
		||||
      <Text variant="pageHeading">My Profile</Text>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user