Merge version_1 into main #2

Merged
bender merged 7 commits from version_1 into main 2026-02-24 16:06:40 +00:00
4 changed files with 49 additions and 237 deletions

View File

@@ -1,14 +1,9 @@
use client";
"use client";
import ReactLenis from "lenis/react";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import { useBlogPosts } from "@/hooks/useBlogPosts";
import NavbarStyleApple from '@/components/navbar/NavbarStyleApple/NavbarStyleApple';
import BlogCardThree from '@/components/sections/blog/BlogCardThree';
export default function BlogPage() {
const { posts, isLoading } = useBlogPosts();
return (
<ThemeProvider
defaultButtonVariant="expand-hover"
@@ -22,41 +17,23 @@ export default function BlogPage() {
secondaryButtonStyle="layered"
headingFontWeight="light"
>
<ReactLenis root>
<div id="nav" data-section="nav">
<NavbarStyleApple
brandName="No song"
navItems={[
{ name: "Home", id: "/" },
{ name: "Hero", id: "hero-section" },
{ name: "About", id: "about-section" },
{ name: "Feature", id: "features-section" },
{ name: "Product", id: "products-section" },
{ name: "Testimonial", id: "testimonials-section" },
{ name: "Contact", id: "contact-section" },
{ name: "Footer", id: "footer-section" },
{ name: "Products", id: "/#products-section" },
{ name: "About", id: "/#about-section" },
{ name: "Contact", id: "/#contact-section" },
]}
/>
{isLoading ? (
<div className="w-content-width mx-auto py-20 text-center">
<p className="text-foreground">Loading posts...</p>
</div>
) : (
<div id="blog" data-section="blog">
<BlogCardThree
blogs={posts}
title="Featured Articles"
description="Explore our latest insights"
animationType="slide-up"
textboxLayout="default"
useInvertedBackground={false}
carouselMode="buttons"
/>
</div>
)}
{/* No footer is rendered as per the empty FOOTER_INFO and FOOTER_PROPS_SCHEMA */}
</ReactLenis>
</div>
<main className="flex flex-col items-center justify-center min-h-screen py-20 px-4">
<div className="text-center">
<h1 className="text-4xl font-bold">Blog</h1>
<p className="mt-4 text-lg text-foreground/80">Our latest articles and news will be posted here. Stay tuned!</p>
</div>
</main>
</ThemeProvider>
);
}

View File

@@ -32,11 +32,10 @@ export default function LandingPage() {
navItems={[
{ name: "Hero", id: "hero-section" },
{ name: "About", id: "about-section" },
{ name: "Feature", id: "features-section" },
{ name: "Product", id: "products-section" },
{ name: "Testimonial", id: "testimonials-section" },
{ name: "Features", id: "features-section" },
{ name: "Products", id: "products-section" },
{ name: "Testimonials", id: "testimonials-section" },
{ name: "Contact", id: "contact-section" },
{ name: "Footer", id: "footer-section" },
]}
/>
</div>
@@ -148,12 +147,12 @@ export default function LandingPage() {
<div id="testimonials-section" data-section="testimonials-section" className="w-full">
<TestimonialCardSix
testimonials={[
{ id: "testimonial-1", name: "Alexandra Chen", handle: "@alex_chen_music", testimonial: "The attention to detail in every No song instrument is unmatched. My violin has transformed my performances.", imageSrc: "https://img.b2bpic.net/free-photo/man-holding-chord-guitar-close-up_23-2148673598.jpg?_wi=1", imageAlt: "Alexandra Chen playing a violin", icon: Music },
{ id: "testimonial-2", name: "Marcus Rodriguez", handle: "@marcus_rodriguez", testimonial: "Professional-grade craftsmanship and sound quality. These instruments are worth every penny.", imageSrc: "https://img.b2bpic.net/free-photo/female-student-playing-violin_107420-64807.jpg?_wi=1", imageAlt: "Marcus Rodriguez with a guitar", icon: Guitar },
{ id: "testimonial-3", name: "Sophie Laurent", handle: "@sophie_laurent", testimonial: "As a conductor, I rely on No song for my ensemble's needs. Their instruments deliver consistent excellence.", imageSrc: "https://img.b2bpic.net/free-photo/drummer-playing-drum-set_107420-96123.jpg?_wi=1", imageAlt: "Sophie Laurent conducting an orchestra", icon: Mic },
{ id: "testimonial-4", name: "Ben Carter", handle: "@bencarterkeys", testimonial: "The quality is simply outstanding. The piano I purchased has a rich and beautiful tone that inspires me daily.", imageSrc: "https://img.b2bpic.net/free-photo/man-holding-chord-guitar-close-up_23-2148673598.jpg?_wi=2", imageAlt: "Ben Carter playing piano", icon: Music },
{ id: "testimonial-5", name: "Olivia Martinez", handle: "@olivia_sings", testimonial: "From the moment I picked it up, I could feel the superior craftsmanship. It's a joy to play.", imageSrc: "https://img.b2bpic.net/free-photo/female-student-playing-violin_107420-64807.jpg?_wi=2", imageAlt: "Olivia Martinez with a guitar", icon: Guitar },
{ id: "testimonial-6", name: "David Lee", handle: "@davidleedrums", testimonial: "I recommend No Song to all my students. The reliability and sound are second to none for professionals.", imageSrc: "https://img.b2bpic.net/free-photo/drummer-playing-drum-set_107420-96123.jpg?_wi=2", imageAlt: "David Lee at his drum set", icon: Mic },
{ id: "testimonial-1", name: "Alexandra Chen", handle: "@alex_chen_music", testimonial: "The attention to detail in every No song instrument is unmatched. My violin has transformed my performances.", imageSrc: "https://img.b2bpic.net/free-photo/man-holding-chord-guitar-close-up_23-2148673598.jpg", imageAlt: "Alexandra Chen playing a violin", icon: Music },
{ id: "testimonial-2", name: "Marcus Rodriguez", handle: "@marcus_rodriguez", testimonial: "Professional-grade craftsmanship and sound quality. These instruments are worth every penny.", imageSrc: "https://img.b2bpic.net/free-photo/female-student-playing-violin_107420-64807.jpg", imageAlt: "Marcus Rodriguez with a guitar", icon: Guitar },
{ id: "testimonial-3", name: "Sophie Laurent", handle: "@sophie_laurent", testimonial: "As a conductor, I rely on No song for my ensemble's needs. Their instruments deliver consistent excellence.", imageSrc: "https://img.b2bpic.net/free-photo/drummer-playing-drum-set_107420-96123.jpg", imageAlt: "Sophie Laurent conducting an orchestra", icon: Mic },
{ id: "testimonial-4", name: "Ben Carter", handle: "@bencarterkeys", testimonial: "The quality is simply outstanding. The piano I purchased has a rich and beautiful tone that inspires me daily.", imageSrc: "https://img.b2bpic.net/free-photo/man-holding-chord-guitar-close-up_23-2148673598.jpg", imageAlt: "Ben Carter playing piano", icon: Music },
{ id: "testimonial-5", name: "Olivia Martinez", handle: "@olivia_sings", testimonial: "From the moment I picked it up, I could feel the superior craftsmanship. It's a joy to play.", imageSrc: "https://img.b2bpic.net/free-photo/female-student-playing-violin_107420-64807.jpg", imageAlt: "Olivia Martinez with a guitar", icon: Guitar },
{ id: "testimonial-6", name: "David Lee", handle: "@davidleedrums", testimonial: "I recommend No Song to all my students. The reliability and sound are second to none for professionals.", imageSrc: "https://img.b2bpic.net/free-photo/drummer-playing-drum-set_107420-96123.jpg", imageAlt: "David Lee at his drum set", icon: Mic },
]}
animationType="slide-up"
title="What Musicians Say"

View File

@@ -1,78 +1,13 @@
"use client";
import { Suspense, use, useCallback } from "react";
import { useRouter } from "next/navigation";
import ReactLenis from "lenis/react";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleApple from "@/components/navbar/NavbarStyleApple/NavbarStyleApple";
import ProductDetailCard from "@/components/ecommerce/productDetail/ProductDetailCard";
import ProductCart from "@/components/ecommerce/cart/ProductCart";
import { useProductDetail } from "@/hooks/useProductDetail";
import { useCart } from "@/hooks/useCart";
import { useCheckout } from "@/hooks/useCheckout";
interface ProductPageProps {
params: Promise<{ id: string }>;
params: { id: string };
}
export default function ProductPage({ params }: ProductPageProps) {
return (
<Suspense fallback={null}>
<ProductPageContent params={params} />
</Suspense>
);
}
function ProductPageContent({ params }: ProductPageProps) {
const { id } = use(params);
const router = useRouter();
const {
product,
isLoading,
images,
meta,
variants,
quantityVariant,
selectedQuantity,
createCartItem,
} = useProductDetail(id);
const {
items: cartItems,
isOpen: cartOpen,
setIsOpen: setCartOpen,
addItem,
updateQuantity,
removeItem,
total: cartTotal,
getCheckoutItems,
} = useCart();
const { buyNow, checkout, isLoading: isCheckoutLoading } = useCheckout();
const handleAddToCart = useCallback(() => {
const item = createCartItem();
if (item) {
addItem(item);
}
}, [createCartItem, addItem]);
const handleBuyNow = useCallback(() => {
if (product) {
buyNow(product, selectedQuantity);
}
}, [product, selectedQuantity, buyNow]);
const handleCheckout = useCallback(async () => {
if (cartItems.length === 0) return;
const currentUrl = new URL(window.location.href);
currentUrl.searchParams.set("success", "true");
await checkout(getCheckoutItems(), { successUrl: currentUrl.toString() });
}, [cartItems, checkout, getCheckoutItems]);
const themeProviderProps = {
defaultButtonVariant: "expand-hover", defaultTextAnimation: "background-highlight", borderRadius: "pill", contentWidth: "compact", sizing: "largeSmallSizeLargeTitles", background: "circleGradient", cardStyle: "gradient-radial", primaryButtonStyle: "double-inset", secondaryButtonStyle: "layered", headingFontWeight: "light"
};
@@ -80,92 +15,25 @@ function ProductPageContent({ params }: ProductPageProps) {
const navbarProps = {
brandName: "No song", navItems: [
{ name: "Home", id: "/" },
{ name: "Shop", id: "/shop" }
],
button: { text: "Cart", onClick: () => setCartOpen(true) }
{ name: "Products", id: "/#products-section" },
{ name: "About", id: "/#about-section" },
{ name: "Contact", id: "/#contact-section" },
]
};
if (isLoading) {
return (
<ThemeProvider {...themeProviderProps}>
<ReactLenis root>
<div id="navbar" data-section="navbar">
<NavbarStyleApple {...navbarProps} />
</div>
<main className="min-h-screen flex items-center justify-center pt-20">
<p className="text-foreground">Loading product...</p>
</main>
</ReactLenis>
</ThemeProvider>
);
}
if (!product) {
return (
<ThemeProvider {...themeProviderProps}>
<ReactLenis root>
<div id="navbar" data-section="navbar">
<NavbarStyleApple {...navbarProps} />
</div>
<main className="min-h-screen flex items-center justify-center pt-20">
<div className="text-center">
<p className="text-foreground mb-4">Product not found</p>
<button
onClick={() => router.push("/shop")}
className="primary-button px-6 py-2 rounded-theme text-primary-cta-text"
>
Back to Shop
</button>
</div>
</main>
</ReactLenis>
</ThemeProvider>
);
}
return (
<ThemeProvider {...themeProviderProps}>
<ReactLenis root>
<div id="navbar" data-section="navbar">
<NavbarStyleApple {...navbarProps} />
<div id="nav" data-section="nav">
<NavbarStyleApple {...navbarProps} />
</div>
<main className="min-h-screen flex items-center justify-center pt-20 px-4">
<div className="text-center">
<h1 className="text-4xl font-bold">Product Details</h1>
<p className="mt-4 text-lg text-foreground/80">
Details for product ID: {params.id} will be displayed here soon.
</p>
</div>
<div id="product-detail-card" data-section="product-detail-card">
<ProductDetailCard
layout="page"
name={product.name}
price={product.price}
salePrice={meta.salePrice}
rating={product.rating || 0}
description={product.description}
images={images}
variants={variants.length > 0 ? variants : undefined}
quantity={quantityVariant}
ribbon={meta.ribbon}
inventoryStatus={meta.inventoryStatus}
inventoryQuantity={meta.inventoryQuantity}
sku={meta.sku}
buttons={[
{ text: "Add To Cart", onClick: handleAddToCart },
{ text: "Buy Now", onClick: handleBuyNow },
]}
/>
</div>
<div id="product-cart" data-section="product-cart">
<ProductCart
isOpen={cartOpen}
onClose={() => setCartOpen(false)}
items={cartItems}
onQuantityChange={updateQuantity}
onRemove={removeItem}
total={`$${cartTotal}`}
buttons={[
{
text: isCheckoutLoading ? "Processing..." : "Check Out", onClick: handleCheckout,
},
]}
/>
</div>
</ReactLenis>
</main>
</ThemeProvider>
);
}
}

View File

@@ -1,21 +1,10 @@
"use client";
import { Suspense } from "react";
import ReactLenis from "lenis/react";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleApple from '@/components/navbar/NavbarStyleApple/NavbarStyleApple';
import ProductCatalog from "@/components/ecommerce/productCatalog/ProductCatalog";
import { useProductCatalog } from "@/hooks/useProductCatalog";
function ShopPageContent() {
const {
products,
isLoading,
search,
setSearch,
filters,
} = useProductCatalog({ basePath: "/shop" });
const themeProviderProps = {
defaultButtonVariant: "expand-hover", defaultTextAnimation: "background-highlight", borderRadius: "pill", contentWidth: "compact", sizing: "largeSmallSizeLargeTitles", background: "circleGradient", cardStyle: "gradient-radial", primaryButtonStyle: "double-inset", secondaryButtonStyle: "layered", headingFontWeight: "light"
};
@@ -23,44 +12,23 @@ function ShopPageContent() {
const navbarProps = {
brandName: "No song", navItems: [
{ name: "Home", id: "/" },
{ name: "Shop", id: "/shop" }
],
button: { text: "Cart", onClick: () => console.log("Cart button clicked") }
{ name: "Products", id: "/#products-section" },
{ name: "About", id: "/#about-section" },
{ name: "Contact", id: "/#contact-section" },
]
};
if (isLoading) {
return (
<ThemeProvider {...themeProviderProps}>
<ReactLenis root>
<div id="navbar" data-section="navbar">
<NavbarStyleApple {...navbarProps} />
</div>
<main className="min-h-screen flex items-center justify-center pt-20">
<p className="text-foreground">Loading products...</p>
</main>
</ReactLenis>
</ThemeProvider>
);
}
return (
<ThemeProvider {...themeProviderProps}>
<ReactLenis root>
<div id="navbar" data-section="navbar">
<NavbarStyleApple {...navbarProps} />
<div id="nav" data-section="nav">
<NavbarStyleApple {...navbarProps} />
</div>
<main className="flex flex-col items-center justify-center min-h-screen py-20 px-4">
<div className="text-center">
<h1 className="text-4xl font-bold">Shop</h1>
<p className="mt-4 text-lg text-foreground/80">Our collection of premium instruments will be available here soon.</p>
</div>
<div id="product-catalog" data-section="product-catalog">
<ProductCatalog
layout="page"
products={products}
searchValue={search}
onSearchChange={setSearch}
searchPlaceholder="Search products..."
filters={filters}
emptyMessage="No products found"
/>
</div>
</ReactLenis>
</main>
</ThemeProvider>
);
}