Update src/app/shop/[id]/page.tsx
This commit is contained in:
@@ -73,22 +73,8 @@ function ProductPageContent({ params }: ProductPageProps) {
|
||||
await checkout(getCheckoutItems(), { successUrl: currentUrl.toString() });
|
||||
}, [cartItems, checkout, getCheckoutItems]);
|
||||
|
||||
const themeProviderProps = {
|
||||
defaultButtonVariant: "shift-hover",
|
||||
defaultTextAnimation: "entrance-slide",
|
||||
borderRadius: "rounded",
|
||||
contentWidth: "small",
|
||||
sizing: "largeSmallSizeLargeTitles",
|
||||
background: "floatingGradient",
|
||||
cardStyle: "glass-elevated",
|
||||
primaryButtonStyle: "shadow",
|
||||
secondaryButtonStyle: "glass",
|
||||
headingFontWeight: "bold"
|
||||
};
|
||||
|
||||
const navbarProps = {
|
||||
brandName: "Baba's Bakery",
|
||||
navItems: [
|
||||
brandName: "Baba's Bakery", navItems: [
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "Shop", id: "/shop" }
|
||||
],
|
||||
@@ -98,7 +84,18 @@ function ProductPageContent({ params }: ProductPageProps) {
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<ThemeProvider {...themeProviderProps}>
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="shift-hover"
|
||||
defaultTextAnimation="entrance-slide"
|
||||
borderRadius="rounded"
|
||||
contentWidth="small"
|
||||
sizing="largeSmallSizeLargeTitles"
|
||||
background="floatingGradient"
|
||||
cardStyle="glass-elevated"
|
||||
primaryButtonStyle="shadow"
|
||||
secondaryButtonStyle="glass"
|
||||
headingFontWeight="bold"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="navbar" data-section="navbar">
|
||||
<NavbarLayoutFloatingOverlay {...navbarProps} />
|
||||
@@ -113,7 +110,18 @@ function ProductPageContent({ params }: ProductPageProps) {
|
||||
|
||||
if (!product) {
|
||||
return (
|
||||
<ThemeProvider {...themeProviderProps}>
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="shift-hover"
|
||||
defaultTextAnimation="entrance-slide"
|
||||
borderRadius="rounded"
|
||||
contentWidth="small"
|
||||
sizing="largeSmallSizeLargeTitles"
|
||||
background="floatingGradient"
|
||||
cardStyle="glass-elevated"
|
||||
primaryButtonStyle="shadow"
|
||||
secondaryButtonStyle="glass"
|
||||
headingFontWeight="bold"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="navbar" data-section="navbar">
|
||||
<NavbarLayoutFloatingOverlay {...navbarProps} />
|
||||
@@ -135,7 +143,18 @@ function ProductPageContent({ params }: ProductPageProps) {
|
||||
}
|
||||
|
||||
return (
|
||||
<ThemeProvider {...themeProviderProps}>
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="shift-hover"
|
||||
defaultTextAnimation="entrance-slide"
|
||||
borderRadius="rounded"
|
||||
contentWidth="small"
|
||||
sizing="largeSmallSizeLargeTitles"
|
||||
background="floatingGradient"
|
||||
cardStyle="glass-elevated"
|
||||
primaryButtonStyle="shadow"
|
||||
secondaryButtonStyle="glass"
|
||||
headingFontWeight="bold"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="navbar" data-section="navbar">
|
||||
<NavbarLayoutFloatingOverlay {...navbarProps} />
|
||||
@@ -171,8 +190,7 @@ function ProductPageContent({ params }: ProductPageProps) {
|
||||
total={`$${cartTotal}`}
|
||||
buttons={[
|
||||
{
|
||||
text: isCheckoutLoading ? "Processing..." : "Check Out",
|
||||
onClick: handleCheckout,
|
||||
text: isCheckoutLoading ? "Processing..." : "Check Out", onClick: handleCheckout,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
@@ -180,4 +198,4 @@ function ProductPageContent({ params }: ProductPageProps) {
|
||||
</ReactLenis>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user