Apply desktop viewport to WeeklyActual and report view; responsive on welcome screen

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-21 09:08:26 +00:00
parent 3a8661127a
commit 53a631fe93
2 changed files with 5 additions and 0 deletions

View file

@ -5,6 +5,7 @@ import {
FileBarChart, TrendingUp, Settings, Menu, FileBarChart, TrendingUp, Settings, Menu,
} from 'lucide-react' } from 'lucide-react'
import { useAuth } from '../components/AuthGate' import { useAuth } from '../components/AuthGate'
import { useFrameViewport } from '../hooks/useFrameViewport'
import { fetchReports, runReport } from '../api' import { fetchReports, runReport } from '../api'
import type { ReportMeta, ReportResult } from '../types' import type { ReportMeta, ReportResult } from '../types'
import DirectorsForecast from './DirectorsForecast' import DirectorsForecast from './DirectorsForecast'
@ -283,6 +284,8 @@ export default function ReportsPage() {
const [loading, setLoading] = useState(false) const [loading, setLoading] = useState(false)
const [error, setError] = useState<string | null>(null) const [error, setError] = useState<string | null>(null)
useFrameViewport(selected || showSettings ? 'desktop' : 'responsive')
useEffect(() => { useEffect(() => {
fetchReports().then(setReports).catch(err => setError(err.message)) fetchReports().then(setReports).catch(err => setError(err.message))
}, []) }, [])

View file

@ -1,4 +1,5 @@
import { useCallback, useEffect, useState } from 'react' import { useCallback, useEffect, useState } from 'react'
import { useFrameViewport } from '../hooks/useFrameViewport'
import { ChevronLeft, ChevronRight, RefreshCw, Printer } from 'lucide-react' import { ChevronLeft, ChevronRight, RefreshCw, Printer } from 'lucide-react'
import { import {
ResponsiveContainer, ResponsiveContainer,
@ -482,6 +483,7 @@ function UtilitiesPlaceholder() {
// ── Main component ───────────────────────────────────────────────────────── // ── Main component ─────────────────────────────────────────────────────────
export default function WeeklyActual() { export default function WeeklyActual() {
useFrameViewport('desktop')
const [weekEnding, setWeekEnding] = useState(defaultWeekEnding) const [weekEnding, setWeekEnding] = useState(defaultWeekEnding)
const [data, setData] = useState<WeeklyActualData | null>(null) const [data, setData] = useState<WeeklyActualData | null>(null)
const [loading, setLoading] = useState(false) const [loading, setLoading] = useState(false)