import { fetchAllProducts } from "@/lib/stripe/products" import { PublicInset, PublicPageHeader, PublicSurface, } from "@/components/public-surface" 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: Awaited> = [] let error: string | null = null try { products = await fetchAllProducts() } catch (err) { if (err instanceof Error) { if (err.message.includes("STRIPE_SECRET_KEY")) { error = "Our product catalog is temporarily unavailable. Please contact us for current machine options." } else { error = "Failed to load products. Please try again later." } } else { error = "Failed to load products. Please try again later." } } return (
Ask About Sales
{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.

) : (
)}
) }