diff --git a/examples/b2b/app/components/Header.tsx b/examples/b2b/app/components/Header.tsx index 410c0645bc..003e3e8d00 100644 --- a/examples/b2b/app/components/Header.tsx +++ b/examples/b2b/app/components/Header.tsx @@ -4,6 +4,10 @@ import {useState, Suspense} from 'react'; import type {HeaderQuery} from 'storefrontapi.generated'; import type {LayoutProps} from './Layout'; import {useRootLoaderData} from '~/root'; +import type { + CompanyLocation, + CompanyLocationConnection, +} from '@shopify/hydrogen-react/customer-account-api-types'; /***********************************************/ /********** EXAMPLE UPDATE STARTS ************/ @@ -156,7 +160,7 @@ function CartToggle({cart}: Pick) { /********** EXAMPLE UPDATE STARTS ************/ function LocationDropdown({company}: Pick) { const locations = company?.locations?.edges - ? company.locations.edges.map((location) => { + ? company.locations.edges.map((location: CompanyLocationConnection) => { return {...location.node}; }) : []; @@ -187,7 +191,7 @@ function LocationDropdown({company}: Pick) { value={selectedLocation} style={{marginRight: '4px'}} > - {locations.map((location) => { + {locations.map((location: CompanyLocation) => { return (