import { fetchAllProducts } from '@/lib/stripe/products' import { ProductGrid } from '@/components/product-grid' import Link from 'next/link' export const metadata = { title: 'Products | Rocky Mountain Vending', description: 'Shop our selection of vending machines and equipment', } export default async function ProductsPage() { let products = [] let error: string | null = null try { products = await fetchAllProducts() } catch (err) { console.error('Error fetching products:', err) if (err instanceof Error) { if (err.message.includes('STRIPE_SECRET_KEY')) { error = 'Stripe configuration error. Please check environment variables.' } else { error = 'Failed to load products. Please try again later.' } } else { error = 'Failed to load products. Please try again later.' } } return (
Admin: Setup Guide

Our Products

Browse our selection of vending machines and equipment

{error ? (

{error}

Please try again later.

) : products.length === 0 ? (

No products available yet

Our product catalog is being prepared. Please check back soon or contact us directly for current offerings.

For Vending Machine Sales:

Call us at (435) 233-9668 or visit our contact page for immediate assistance.

) : ( )}
) }