'use client'; import { Box, Container, Typography, Button, Card, CardContent, CardMedia, Grid, Chip, CircularProgress, Alert } from '@mui/material'; import {useState, useEffect, JSX} from 'react'; import { ShoppingCart, Palette, ImageOutlined, CreditCard, LocalShipping, CheckCircle } from '@mui/icons-material'; import clientApi from "@/lib/clientApi"; interface Product { id: string; name: string; description: string; imageUrl?: string; basePrice: number; isCustomizable: boolean; } interface ApiResponse { items: Product[]; } interface Step { number: number; label: string; description: string; icon: JSX.Element; details: string; } export default function HomePage(): JSX.Element { const [products, setProducts] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); useEffect(() => { const fetchProducts = async (): Promise => { try { const response = await clientApi.get('/products/', { params: { PageSize: 3, PageNumber: 1, IsActive: true, SortBy: 'Price', SortDirection: 'DESC' } }); setProducts(response.data.items); } catch (err) { setError('Failed to load products'); console.error('Error fetching products:', err); } finally { setLoading(false); } }; fetchProducts(); }, []); const steps: Step[] = [ { number: 1, label: 'Pick an Item', description: 'Browse our extensive collection of customizable products and select the perfect base for your design. From premium t-shirts and hoodies to mugs, phone cases, and more - we have everything you need to bring your vision to life.', icon: , details: 'Explore hundreds of high-quality products across multiple categories. Filter by material, size, color, and price to find exactly what you\'re looking for.' }, { number: 2, label: 'Choose Variant', description: 'Select from available sizes, colors, and material options that match your preferences and needs. Each product comes with detailed specifications and sizing guides.', icon: , details: 'View real-time previews of different variants. Check material quality, durability ratings, and care instructions for each option.' }, { number: 3, label: 'Customize with Images', description: 'Upload your own designs, add custom text, or use our intuitive design tools to create something truly unique. Our editor supports various file formats and offers professional design features.', icon: , details: 'Drag and drop images, adjust positioning, add filters, create text overlays, and preview your design in real-time on the selected product.' }, { number: 4, label: 'Pay', description: 'Complete your order with our secure checkout process. We accept multiple payment methods and provide instant order confirmation with detailed receipts.', icon: , details: 'Review your design, confirm quantities, apply discount codes, and choose from various secure payment options including cards, PayPal, and more.' }, { number: 5, label: 'Wait for Order', description: 'Sit back and relax while we handle the rest. Our professional printing team will carefully produce your custom item and ship it directly to your door.', icon: , details: 'Track your order status in real-time, from printing to packaging to shipping. Receive updates via email and SMS throughout the process.' } ]; return ( Custom Printing
Made Simple
Transform your ideas into reality with our premium custom printing services. From t-shirts to mugs, we bring your designs to life with professional quality and lightning-fast turnaround times. Professional Quality Guaranteed Fast 24-48 Hour Turnaround Free Design Support 100% Satisfaction Promise ⭐⭐⭐⭐⭐ Trusted by 10,000+ customers • 4.9/5 rating
Featured Products Discover our most popular customizable products. Each item is carefully selected for quality and perfect for personalization. {loading && ( )} {error && ( {error} )} {!loading && !error && ( {products.map((product: Product) => ( {product.name} {product.description} From ${product.basePrice?.toFixed(2)} {product.isCustomizable && ( )} ))} )} How It Works Our streamlined process makes custom printing simple and stress-free. Follow these five easy steps to get your perfect custom products. {steps.map((step: Step, index: number) => ( {step.icon} {step.number} {step.label} {step.description} {step.details} ))} Ready to Get Started? Join thousands of satisfied customers who trust us with their custom printing needs. Quality guaranteed, fast turnaround, and competitive prices.
); }