Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6215057a78 | |||
| d73c7ef2bc | |||
| b585c9a84c | |||
| 21930b6513 | |||
| c1eabd9458 | |||
| 54fc7f2975 | |||
| c2321f00d2 | |||
| dfc497c645 |
365
src/app/page.tsx
365
src/app/page.tsx
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||||
import ReactLenis from "lenis/react";
|
import ReactLenis from "lenis/react";
|
||||||
|
import { useState, useEffect } from "react";
|
||||||
import ContactCTA from '@/components/sections/contact/ContactCTA';
|
import ContactCTA from '@/components/sections/contact/ContactCTA';
|
||||||
import FaqBase from '@/components/sections/faq/FaqBase';
|
import FaqBase from '@/components/sections/faq/FaqBase';
|
||||||
import FeatureCardTwentyEight from '@/components/sections/feature/FeatureCardTwentyEight';
|
import FeatureCardTwentyEight from '@/components/sections/feature/FeatureCardTwentyEight';
|
||||||
@@ -9,12 +10,37 @@ import FooterLogoEmphasis from '@/components/sections/footer/FooterLogoEmphasis'
|
|||||||
import HeroOverlayTestimonial from '@/components/sections/hero/HeroOverlayTestimonial';
|
import HeroOverlayTestimonial from '@/components/sections/hero/HeroOverlayTestimonial';
|
||||||
import MetricCardThree from '@/components/sections/metrics/MetricCardThree';
|
import MetricCardThree from '@/components/sections/metrics/MetricCardThree';
|
||||||
import NavbarStyleCentered from '@/components/navbar/NavbarStyleCentered/NavbarStyleCentered';
|
import NavbarStyleCentered from '@/components/navbar/NavbarStyleCentered/NavbarStyleCentered';
|
||||||
import ProductCardThree from '@/components/sections/product/ProductCardThree';
|
|
||||||
import SocialProofOne from '@/components/sections/socialProof/SocialProofOne';
|
import SocialProofOne from '@/components/sections/socialProof/SocialProofOne';
|
||||||
import TestimonialCardTwo from '@/components/sections/testimonial/TestimonialCardTwo';
|
import TestimonialCardTwo from '@/components/sections/testimonial/TestimonialCardTwo';
|
||||||
import { Globe, Package, Smile } from "lucide-react";
|
import { Globe, Package, Smile, ShieldCheck, Loader2, AlertCircle } from "lucide-react";
|
||||||
|
|
||||||
export default function LandingPage() {
|
export default function LandingPage() {
|
||||||
|
const [products, setProducts] = useState([]);
|
||||||
|
const [loading, setLoading] = useState(true);
|
||||||
|
const [error, setError] = useState(null);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
async function fetchProducts() {
|
||||||
|
try {
|
||||||
|
setLoading(true);
|
||||||
|
const response = await fetch('https://api.teemdrop.com/v1/products');
|
||||||
|
if (!response.ok) throw new Error('Failed to fetch products');
|
||||||
|
const data = await response.json();
|
||||||
|
setProducts(data.map(p => ({
|
||||||
|
id: p.id,
|
||||||
|
name: p.title,
|
||||||
|
price: `$${p.price}`,
|
||||||
|
imageSrc: p.image || "http://img.b2bpic.net/free-photo/minimalist-tech-setup-with-nvme-ssd_58702-17244.jpg"
|
||||||
|
})));
|
||||||
|
} catch (err) {
|
||||||
|
setError(err.message);
|
||||||
|
} finally {
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fetchProducts();
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeProvider
|
<ThemeProvider
|
||||||
defaultButtonVariant="directional-hover"
|
defaultButtonVariant="directional-hover"
|
||||||
@@ -29,230 +55,135 @@ export default function LandingPage() {
|
|||||||
headingFontWeight="extrabold"
|
headingFontWeight="extrabold"
|
||||||
>
|
>
|
||||||
<ReactLenis root>
|
<ReactLenis root>
|
||||||
<div id="nav" data-section="nav">
|
<div id="nav" data-section="nav">
|
||||||
<NavbarStyleCentered
|
<NavbarStyleCentered
|
||||||
navItems={[
|
navItems={[
|
||||||
{
|
{ name: "Products", id: "#products" },
|
||||||
name: "Products", id: "#products"},
|
{ name: "Reviews", id: "#testimonials" },
|
||||||
{
|
{ name: "Support", id: "#faq" },
|
||||||
name: "Reviews", id: "#testimonials"},
|
]}
|
||||||
{
|
brandName="ShopifyDrop"
|
||||||
name: "Support", id: "#faq"},
|
/>
|
||||||
]}
|
</div>
|
||||||
brandName="ShopifyDrop"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="hero" data-section="hero">
|
<div id="hero" data-section="hero">
|
||||||
<HeroOverlayTestimonial
|
<HeroOverlayTestimonial
|
||||||
title="Upgrade Your Daily Lifestyle"
|
title="Upgrade Your Daily Lifestyle"
|
||||||
description="Discover curated high-tech gear designed to simplify your routine and elevate your personal efficiency."
|
description="Discover curated high-tech gear designed to simplify your routine and elevate your personal efficiency."
|
||||||
testimonials={[
|
testimonials={[]}
|
||||||
{
|
buttons={[{ text: "Shop Now", href: "#products" }]}
|
||||||
name: "Alex R.", handle: "@alextech", testimonial: "The quality of products is unmatched. Fast shipping and great support.", rating: 5,
|
imageSrc="http://img.b2bpic.net/free-photo/modern-kitchen-interior-design_23-2151821330.jpg"
|
||||||
imageSrc: "http://img.b2bpic.net/free-photo/close-up-young-businessman_23-2149153813.jpg", imageAlt: "Professional portrait"},
|
/>
|
||||||
{
|
</div>
|
||||||
name: "Jordan S.", handle: "@jsdev", testimonial: "My new favorite store for gadget essentials.", rating: 5,
|
|
||||||
imageSrc: "http://img.b2bpic.net/free-photo/portrait-smiley-business-woman_23-2148603029.jpg", imageAlt: "Professional portrait"},
|
|
||||||
{
|
|
||||||
name: "Sarah K.", handle: "@sarahk", testimonial: "Everything I bought works perfectly. Really impressed.", rating: 5,
|
|
||||||
imageSrc: "http://img.b2bpic.net/free-photo/business-woman-banner-concept-with-copy-space_23-2149601533.jpg", imageAlt: "Professional portrait"},
|
|
||||||
{
|
|
||||||
name: "Mike D.", handle: "@miked", testimonial: "Reliable and fast delivery, definitely coming back.", rating: 4,
|
|
||||||
imageSrc: "http://img.b2bpic.net/free-photo/young-businesswoman-portrait-office_1262-1506.jpg", imageAlt: "Professional portrait"},
|
|
||||||
{
|
|
||||||
name: "Elena V.", handle: "@elenav", testimonial: "Top-tier tech gear at great prices. Very satisfied.", rating: 5,
|
|
||||||
imageSrc: "http://img.b2bpic.net/free-photo/close-up-portrait-young-handsome-successful-man_1163-5475.jpg", imageAlt: "Professional portrait"},
|
|
||||||
]}
|
|
||||||
buttons={[
|
|
||||||
{
|
|
||||||
text: "Shop Now", href: "#products"},
|
|
||||||
]}
|
|
||||||
imageSrc="http://img.b2bpic.net/free-photo/modern-kitchen-interior-design_23-2151821330.jpg"
|
|
||||||
imageAlt="High-tech workspace"
|
|
||||||
avatars={[
|
|
||||||
{
|
|
||||||
src: "http://img.b2bpic.net/free-photo/portrait-smiling-waitress_107420-12307.jpg", alt: "User 1"},
|
|
||||||
{
|
|
||||||
src: "http://img.b2bpic.net/free-photo/pretty-attractive-young-mixed-race-model-with-large-afro-wearing-navy-jacket-her-naked-body-shorts_633478-1216.jpg", alt: "User 2"},
|
|
||||||
{
|
|
||||||
src: "http://img.b2bpic.net/free-photo/closeup-relaxed-content-woman-leaning-wall_1262-1749.jpg", alt: "User 3"},
|
|
||||||
{
|
|
||||||
src: "http://img.b2bpic.net/free-photo/close-up-portrait-beautiful-teenager_23-2149153360.jpg", alt: "User 4"},
|
|
||||||
{
|
|
||||||
src: "http://img.b2bpic.net/free-photo/attractive-brunette-female-dressed-long-neck-brown-jacket-grey-background_613910-15043.jpg", alt: "User 5"},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="features" data-section="features">
|
<div id="features" data-section="features">
|
||||||
<FeatureCardTwentyEight
|
<FeatureCardTwentyEight
|
||||||
animationType="slide-up"
|
animationType="slide-up"
|
||||||
textboxLayout="default"
|
textboxLayout="default"
|
||||||
useInvertedBackground={false}
|
useInvertedBackground={false}
|
||||||
features={[
|
features={[
|
||||||
{
|
{ id: "1", title: "Free Shipping", subtitle: "Free global delivery on every single order", category: "Logistics", value: "Express" },
|
||||||
id: "1", title: "Free Shipping", subtitle: "On all orders worldwide", category: "Logistics", value: "Express"},
|
{ id: "2", title: "Secure Payment", subtitle: "Protected and encrypted checkout process", category: "Safety", value: "SSL" },
|
||||||
{
|
{ id: "3", title: "24/7 Support", subtitle: "Available for help whenever you need it", category: "Service", value: "Live" },
|
||||||
id: "2", title: "Secure Payment", subtitle: "Encrypted checkout process", category: "Safety", value: "SSL"},
|
]}
|
||||||
{
|
title="Why Shop With Us"
|
||||||
id: "3", title: "24/7 Support", subtitle: "Help whenever you need it", category: "Service", value: "Live"},
|
description="Quality assurance and excellence in every transaction."
|
||||||
]}
|
tag="Trusted & Reliable"
|
||||||
title="Why Shop With Us"
|
tagIcon={ShieldCheck}
|
||||||
description="Quality assurance and excellence in every transaction."
|
/>
|
||||||
/>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="products" data-section="products">
|
<div id="products" data-section="products" className="py-20">
|
||||||
<ProductCardThree
|
<h2 className="text-center text-4xl font-bold mb-10">Featured Gear</h2>
|
||||||
animationType="slide-up"
|
{loading ? (
|
||||||
textboxLayout="default"
|
<div className="flex justify-center items-center py-20">
|
||||||
gridVariant="four-items-2x2-equal-grid"
|
<Loader2 className="animate-spin w-10 h-10 text-primary" />
|
||||||
useInvertedBackground={false}
|
</div>
|
||||||
products={[
|
) : error ? (
|
||||||
{
|
<div className="flex flex-col items-center py-20 text-red-500">
|
||||||
id: "p1", name: "Pro Headphones", price: "$129.00", imageSrc: "http://img.b2bpic.net/free-photo/headphones-record-player_23-2147781816.jpg"},
|
<AlertCircle className="w-10 h-10 mb-4" />
|
||||||
{
|
<p>{error}</p>
|
||||||
id: "p2", name: "Smart Watch", price: "$199.00", imageSrc: "http://img.b2bpic.net/free-photo/stylish-hipster-arab-man-guy-sunglasses-posed-outdoor-street-sunset-sitting-road-shadows_627829-2723.jpg"},
|
</div>
|
||||||
{
|
) : (
|
||||||
id: "p3", name: "Mini Speaker", price: "$89.00", imageSrc: "http://img.b2bpic.net/free-photo/music-decoration-black-friday_23-2147696826.jpg"},
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 px-6">
|
||||||
{
|
{products.map((product) => (
|
||||||
id: "p4", name: "Mechanical Keyboard", price: "$149.00", imageSrc: "http://img.b2bpic.net/free-photo/wireless-earbuds-with-neon-cyberpunk-style-lighting_23-2151074256.jpg"},
|
<div key={product.id} className="border p-4 rounded-lg shadow-sm hover:shadow-md transition-shadow">
|
||||||
{
|
<img src={product.imageSrc} alt={product.name} className="w-full h-48 object-cover rounded mb-4" />
|
||||||
id: "p5", name: "Wireless Mouse", price: "$59.00", imageSrc: "http://img.b2bpic.net/free-photo/minimalist-tech-setup-with-nvme-ssd_58702-17244.jpg"},
|
<h3 className="font-semibold">{product.name}</h3>
|
||||||
{
|
<p className="text-sm text-gray-500">{product.price}</p>
|
||||||
id: "p6", name: "Fast Charger", price: "$39.00", imageSrc: "http://img.b2bpic.net/free-photo/modern-stationary-collection-arrangement_23-2149309662.jpg"},
|
</div>
|
||||||
]}
|
))}
|
||||||
title="Featured Gear"
|
</div>
|
||||||
description="Our best-selling essentials for your modern workspace."
|
)}
|
||||||
/>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="testimonials" data-section="testimonials">
|
<div id="testimonials" data-section="testimonials">
|
||||||
<TestimonialCardTwo
|
<TestimonialCardTwo
|
||||||
animationType="slide-up"
|
animationType="slide-up"
|
||||||
textboxLayout="default"
|
textboxLayout="default"
|
||||||
useInvertedBackground={false}
|
useInvertedBackground={false}
|
||||||
testimonials={[
|
testimonials={[]}
|
||||||
{
|
title="Trusted by Thousands"
|
||||||
id: "t1", name: "Sarah W.", role: "Designer", testimonial: "Amazing store, my order arrived within 3 days!", imageSrc: "http://img.b2bpic.net/free-photo/confident-middle-aged-businesswoman-looking-camera_74855-4120.jpg"},
|
description="See why our customers love our curated collection."
|
||||||
{
|
/>
|
||||||
id: "t2", name: "Mark D.", role: "Engineer", testimonial: "Products are exactly as described. Very happy.", imageSrc: "http://img.b2bpic.net/free-photo/confident-beautiful-young-businesswoman-looking-camera-head-shot-portrait_1163-4928.jpg"},
|
</div>
|
||||||
{
|
|
||||||
id: "t3", name: "Linda M.", role: "Creative", testimonial: "Stylish and functional gadgets that just work.", imageSrc: "http://img.b2bpic.net/free-photo/young-beautiful-woman-posing-wrapping-up-grey-cloth_176420-16804.jpg"},
|
|
||||||
{
|
|
||||||
id: "t4", name: "Chris B.", role: "Developer", testimonial: "Super reliable service and quality gear.", imageSrc: "http://img.b2bpic.net/free-photo/pensive-person-alone-corridor-serious_1262-1042.jpg"},
|
|
||||||
{
|
|
||||||
id: "t5", name: "Emily K.", role: "Consultant", testimonial: "Highly recommended for tech enthusiasts.", imageSrc: "http://img.b2bpic.net/free-photo/positive-confident-businesswoman-wearing-formal-suit-standing-with-arms-folded_74855-10328.jpg"},
|
|
||||||
]}
|
|
||||||
title="Trusted by Thousands"
|
|
||||||
description="See why our customers love our curated collection."
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="metrics" data-section="metrics">
|
<div id="metrics" data-section="metrics">
|
||||||
<MetricCardThree
|
<MetricCardThree
|
||||||
animationType="slide-up"
|
animationType="slide-up"
|
||||||
textboxLayout="default"
|
textboxLayout="default"
|
||||||
useInvertedBackground={false}
|
useInvertedBackground={false}
|
||||||
metrics={[
|
metrics={[
|
||||||
{
|
{ id: "m1", title: "Happy Customers", value: "15,000+", icon: Smile },
|
||||||
id: "m1", title: "Happy Customers", value: "15,000+", icon: Smile,
|
{ id: "m2", title: "Products Shipped", value: "50,000+", icon: Package },
|
||||||
},
|
{ id: "m3", title: "Global Presence", value: "40+", icon: Globe },
|
||||||
{
|
]}
|
||||||
id: "m2", title: "Products Shipped", value: "50,000+", icon: Package,
|
title="Our Impact"
|
||||||
},
|
description="Delivering quality products across the globe."
|
||||||
{
|
/>
|
||||||
id: "m3", title: "Global Presence", value: "40+", icon: Globe,
|
</div>
|
||||||
},
|
|
||||||
]}
|
|
||||||
title="Our Impact"
|
|
||||||
description="Delivering quality products across the globe."
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="socialProof" data-section="socialProof">
|
<div id="socialProof" data-section="socialProof">
|
||||||
<SocialProofOne
|
<SocialProofOne
|
||||||
textboxLayout="default"
|
names={["Tech Insider", "Gadget Daily", "Digital Trends", "Future Gear"]}
|
||||||
useInvertedBackground={false}
|
title="As Seen In"
|
||||||
names={[
|
description=""
|
||||||
"Tech Insider", "Gadget Daily", "Digital Trends", "Future Gear", "Retail Weekly", "Startup Hub", "Global Daily"]}
|
useInvertedBackground={false}
|
||||||
title="As Seen In"
|
textboxLayout="default"
|
||||||
description="Trusted by industry leaders."
|
/>
|
||||||
/>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="faq" data-section="faq">
|
<div id="faq" data-section="faq">
|
||||||
<FaqBase
|
<FaqBase
|
||||||
textboxLayout="default"
|
textboxLayout="default"
|
||||||
useInvertedBackground={false}
|
useInvertedBackground={false}
|
||||||
faqs={[
|
description=""
|
||||||
{
|
faqs={[
|
||||||
id: "f1", title: "How long is shipping?", content: "Orders typically ship within 3-5 business days."},
|
{ id: "f1", title: "How long is shipping?", content: "Orders typically ship within 3-5 business days." },
|
||||||
{
|
]}
|
||||||
id: "f2", title: "Do you offer returns?", content: "Yes, we offer a 30-day return policy for all items."},
|
title="Common Questions"
|
||||||
{
|
faqsAnimation="slide-up"
|
||||||
id: "f3", title: "Is my payment secure?", content: "Absolutely, we use industry-standard encryption for your data."},
|
/>
|
||||||
]}
|
</div>
|
||||||
title="Common Questions"
|
|
||||||
description="Answers to everything you need to know."
|
|
||||||
faqsAnimation="slide-up"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="contact" data-section="contact">
|
<div id="contact" data-section="contact">
|
||||||
<ContactCTA
|
<ContactCTA
|
||||||
useInvertedBackground={false}
|
tag="Contact Us"
|
||||||
background={{
|
title="Need Help With Your Order?"
|
||||||
variant: "plain"}}
|
description="Reach out to our dedicated support team."
|
||||||
tag="Contact Us"
|
useInvertedBackground={false}
|
||||||
title="Need Help With Your Order?"
|
background={{ variant: "plain" }}
|
||||||
description="Reach out to our dedicated support team, and we will get back to you within 24 hours."
|
buttons={[{ text: "Contact Support", href: "mailto:support@shopifydrop.com" }]}
|
||||||
buttons={[
|
/>
|
||||||
{
|
</div>
|
||||||
text: "Contact Support", href: "mailto:support@shopifydrop.com"},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="footer" data-section="footer">
|
<div id="footer" data-section="footer">
|
||||||
<FooterLogoEmphasis
|
<FooterLogoEmphasis
|
||||||
columns={[
|
logoText="ShopifyDrop"
|
||||||
{
|
columns={[]}
|
||||||
items: [
|
/>
|
||||||
{
|
</div>
|
||||||
label: "Shop All", href: "#products"},
|
|
||||||
{
|
|
||||||
label: "About Us", href: "#"},
|
|
||||||
{
|
|
||||||
label: "FAQ", href: "#faq"},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
label: "Contact", href: "mailto:support@shopifydrop.com"},
|
|
||||||
{
|
|
||||||
label: "Shipping Policy", href: "#"},
|
|
||||||
{
|
|
||||||
label: "Returns", href: "#"},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
label: "Instagram", href: "#"},
|
|
||||||
{
|
|
||||||
label: "Twitter", href: "#"},
|
|
||||||
{
|
|
||||||
label: "Facebook", href: "#"},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
logoText="ShopifyDrop"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</ReactLenis>
|
</ReactLenis>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
24
src/lib/teemdrop-api.ts
Normal file
24
src/lib/teemdrop-api.ts
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
const TEEMDROP_API_URL = process.env.NEXT_PUBLIC_TEEMDROP_API_URL || 'https://api.teemdrop.com';
|
||||||
|
const TEEMDROP_API_KEY = process.env.TEEMDROP_API_KEY;
|
||||||
|
|
||||||
|
export const teemdropRequest = async (endpoint: string, options: RequestInit = {}) => {
|
||||||
|
const headers = {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'Authorization': `Bearer ${TEEMDROP_API_KEY}`,
|
||||||
|
...options.headers,
|
||||||
|
};
|
||||||
|
|
||||||
|
const response = await fetch(`${TEEMDROP_API_URL}${endpoint}`, {
|
||||||
|
...options,
|
||||||
|
headers,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error(`Teemdrop API error: ${response.statusText}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return response.json();
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getProducts = () => teemdropRequest('/products');
|
||||||
|
export const getOrderDetails = (orderId: string) => teemdropRequest(`/orders/${orderId}`);
|
||||||
Reference in New Issue
Block a user