Fix Forecasts nav: useParams key was forecastId but route param is :page

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-05 09:48:14 +00:00
parent effad0a4e2
commit 9e6801482f

View file

@ -273,9 +273,9 @@ interface PickupV2Response {
} }
const Forecasts: React.FC = () => { const Forecasts: React.FC = () => {
const { forecastId } = useParams<{ forecastId?: string }>() const { page } = useParams<{ page?: string }>()
const navigate = useNavigate() const navigate = useNavigate()
const activePage = (forecastId as ForecastPage) || 'hotel_rev_day' const activePage = (page as ForecastPage) || 'hotel_rev_day'
const revenueItems: { id: ForecastPage; label: string }[] = [ const revenueItems: { id: ForecastPage; label: string }[] = [
{ id: 'accom', label: 'Accommodation' }, { id: 'accom', label: 'Accommodation' },