Update src/app/shop/[id]/page.tsx
This commit is contained in:
@@ -74,9 +74,6 @@ function ProductPageContent({ params }: ProductPageProps) {
|
|||||||
await checkout(getCheckoutItems(), { successUrl: currentUrl.toString() });
|
await checkout(getCheckoutItems(), { successUrl: currentUrl.toString() });
|
||||||
}, [cartItems, checkout, getCheckoutItems]);
|
}, [cartItems, checkout, getCheckoutItems]);
|
||||||
|
|
||||||
const themeProviderProps = {
|
|
||||||
defaultButtonVariant: "elastic-effect", defaultTextAnimation: "background-highlight", borderRadius: "pill", contentWidth: "small", sizing: "largeSmallSizeLargeTitles", background: "noiseDiagonalGradient", cardStyle: "subtle-shadow", primaryButtonStyle: "flat", secondaryButtonStyle: "layered", headingFontWeight: "light"};
|
|
||||||
|
|
||||||
const navbarProps = {
|
const navbarProps = {
|
||||||
navItems: [{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }],
|
navItems: [{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }],
|
||||||
brandName: "bb.q chicken", className: "py-4 px-6", navItemClassName: "font-medium", buttonClassName: "px-5 py-2", buttonTextClassName: "text-lg", button: { text: "Cart", onClick: () => setCartOpen(true) },
|
brandName: "bb.q chicken", className: "py-4 px-6", navItemClassName: "font-medium", buttonClassName: "px-5 py-2", buttonTextClassName: "text-lg", button: { text: "Cart", onClick: () => setCartOpen(true) },
|
||||||
@@ -88,7 +85,18 @@ function ProductPageContent({ params }: ProductPageProps) {
|
|||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return (
|
return (
|
||||||
<ThemeProvider {...themeProviderProps}>
|
<ThemeProvider
|
||||||
|
defaultButtonVariant="elastic-effect"
|
||||||
|
defaultTextAnimation="background-highlight"
|
||||||
|
borderRadius="pill"
|
||||||
|
contentWidth="small"
|
||||||
|
sizing="largeSmallSizeLargeTitles"
|
||||||
|
background="noiseDiagonalGradient"
|
||||||
|
cardStyle="subtle-shadow"
|
||||||
|
primaryButtonStyle="flat"
|
||||||
|
secondaryButtonStyle="layered"
|
||||||
|
headingFontWeight="light"
|
||||||
|
>
|
||||||
<ReactLenis root>
|
<ReactLenis root>
|
||||||
<div id="navbar" data-section="navbar">
|
<div id="navbar" data-section="navbar">
|
||||||
<NavbarLayoutFloatingInline {...navbarProps} />
|
<NavbarLayoutFloatingInline {...navbarProps} />
|
||||||
@@ -106,7 +114,18 @@ function ProductPageContent({ params }: ProductPageProps) {
|
|||||||
|
|
||||||
if (!product) {
|
if (!product) {
|
||||||
return (
|
return (
|
||||||
<ThemeProvider {...themeProviderProps}>
|
<ThemeProvider
|
||||||
|
defaultButtonVariant="elastic-effect"
|
||||||
|
defaultTextAnimation="background-highlight"
|
||||||
|
borderRadius="pill"
|
||||||
|
contentWidth="small"
|
||||||
|
sizing="largeSmallSizeLargeTitles"
|
||||||
|
background="noiseDiagonalGradient"
|
||||||
|
cardStyle="subtle-shadow"
|
||||||
|
primaryButtonStyle="flat"
|
||||||
|
secondaryButtonStyle="layered"
|
||||||
|
headingFontWeight="light"
|
||||||
|
>
|
||||||
<ReactLenis root>
|
<ReactLenis root>
|
||||||
<div id="navbar" data-section="navbar">
|
<div id="navbar" data-section="navbar">
|
||||||
<NavbarLayoutFloatingInline {...navbarProps} />
|
<NavbarLayoutFloatingInline {...navbarProps} />
|
||||||
@@ -131,7 +150,18 @@ function ProductPageContent({ params }: ProductPageProps) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeProvider {...themeProviderProps}>
|
<ThemeProvider
|
||||||
|
defaultButtonVariant="elastic-effect"
|
||||||
|
defaultTextAnimation="background-highlight"
|
||||||
|
borderRadius="pill"
|
||||||
|
contentWidth="small"
|
||||||
|
sizing="largeSmallSizeLargeTitles"
|
||||||
|
background="noiseDiagonalGradient"
|
||||||
|
cardStyle="subtle-shadow"
|
||||||
|
primaryButtonStyle="flat"
|
||||||
|
secondaryButtonStyle="layered"
|
||||||
|
headingFontWeight="light"
|
||||||
|
>
|
||||||
<ReactLenis root>
|
<ReactLenis root>
|
||||||
<div id="navbar" data-section="navbar">
|
<div id="navbar" data-section="navbar">
|
||||||
<NavbarLayoutFloatingInline {...navbarProps} />
|
<NavbarLayoutFloatingInline {...navbarProps} />
|
||||||
|
|||||||
Reference in New Issue
Block a user