Fix build error: Force dynamic rendering for calculator page
All checks were successful
Build and Push Docker Images / docker (push) Successful in 2m29s
All checks were successful
Build and Push Docker Images / docker (push) Successful in 2m29s
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>
This commit is contained in:
parent
f57ceb7b8f
commit
9cdf7b0786
@ -1,6 +1,9 @@
|
||||
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.',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user