diff --git a/packages/shopify/src/brand/index.ts b/packages/shopify/src/brand/index.ts new file mode 100644 index 000000000..c61676669 --- /dev/null +++ b/packages/shopify/src/brand/index.ts @@ -0,0 +1,6 @@ +import type { Brand } from '@vercel/commerce/types' +import { Logo } from './logo' + +export const brand: Brand.Config = { + Logo, +} diff --git a/packages/shopify/src/brand/logo.tsx b/packages/shopify/src/brand/logo.tsx new file mode 100644 index 000000000..a3715daed --- /dev/null +++ b/packages/shopify/src/brand/logo.tsx @@ -0,0 +1,13 @@ +export const Logo = ({ className = '', ...props }) => ( + + + +) diff --git a/packages/shopify/src/provider.ts b/packages/shopify/src/provider.ts index 00db5c1d3..68a0cd091 100644 --- a/packages/shopify/src/provider.ts +++ b/packages/shopify/src/provider.ts @@ -1,5 +1,7 @@ import { SHOPIFY_CHECKOUT_ID_COOKIE } from './const' +import { brand } from './brand' + import { handler as useCart } from './cart/use-cart' import { handler as useAddItem } from './cart/use-add-item' import { handler as useUpdateItem } from './cart/use-update-item' @@ -16,6 +18,7 @@ import fetcher from './fetcher' export const shopifyProvider = { locale: 'en-us', + brand, cartCookie: SHOPIFY_CHECKOUT_ID_COOKIE, fetcher, cart: { useCart, useAddItem, useUpdateItem, useRemoveItem }, diff --git a/site/components/common/Navbar/Navbar.module.css b/site/components/common/Navbar/Navbar.module.css index faa86d156..c1baceaaf 100644 --- a/site/components/common/Navbar/Navbar.module.css +++ b/site/components/common/Navbar/Navbar.module.css @@ -26,7 +26,7 @@ } .logo { - @apply cursor-pointer rounded-full border transform duration-100 ease-in-out; + @apply cursor-pointer rounded-full transform duration-100 ease-in-out; &:hover { @apply shadow-md; diff --git a/site/components/common/Navbar/Navbar.tsx b/site/components/common/Navbar/Navbar.tsx index 9286ef160..a434032e1 100644 --- a/site/components/common/Navbar/Navbar.tsx +++ b/site/components/common/Navbar/Navbar.tsx @@ -4,6 +4,7 @@ import s from './Navbar.module.css' import NavbarRoot from './NavbarRoot' import { Logo, Container } from '@components/ui' import { Searchbar, UserNav } from '@components/common' +import { brand } from '@framework/brand' interface Link { href: string @@ -13,44 +14,45 @@ interface Link { interface NavbarProps { links?: Link[] } - -const Navbar: FC = ({ links }) => ( - - - - - - - - - - - - All +const Navbar: FC = ({ links }) => { + return ( + + + + + + + {brand.Logo ? : } + - {links?.map((l) => ( - - {l.label} + + + All - ))} - + {links?.map((l) => ( + + {l.label} + + ))} + + + {process.env.COMMERCE_SEARCH_ENABLED && ( + + + + )} + + + {process.env.COMMERCE_SEARCH_ENABLED && ( - - + + )} - - - - - {process.env.COMMERCE_SEARCH_ENABLED && ( - - - - )} - - -) + + + ) +} export default Navbar