Matt 9cdf7b0786
All checks were successful
Build and Push Docker Images / docker (push) Successful in 2m29s
Fix build error: Force dynamic rendering for calculator page
The calculator page was failing during build because useSearchParams()
requires a request context and cannot be used during static site generation.

Added 'export const dynamic = force-dynamic' to force dynamic rendering,
which allows useSearchParams() to work correctly for QR code parameter detection.

This fixes the build error:
"Error occurred prerendering page "/calculator""

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 21:34:12 +01:00

22 lines
999 B
TypeScript

import type { Metadata } from 'next';
import { CalculatorClient } from '../../components/CalculatorClient';
// Force dynamic rendering since we need to read URL search parameters
export const dynamic = 'force-dynamic';
export const metadata: Metadata = {
title: 'Carbon Calculator',
description: 'Calculate your yacht\'s carbon footprint and purchase verified carbon offsets. Enter fuel usage or nautical miles to get accurate CO2 emissions calculations and offset options.',
keywords: ['carbon calculator', 'yacht emissions', 'CO2 calculator', 'fuel emissions', 'carbon footprint', 'offset calculator'],
openGraph: {
title: 'Yacht Carbon Calculator - Calculate & Offset Emissions',
description: 'Calculate your yacht\'s carbon footprint based on fuel consumption or distance traveled, then offset through verified projects.',
type: 'website',
url: 'https://puffinoffset.com/calculator',
},
};
export default function CalculatorPage() {
return <CalculatorClient />;
}