import { useState } from 'react'; import { useWindStore } from '../../store/windStore'; import case1 from '../../assets/diagrams/case-1.png'; import case2 from '../../assets/diagrams/case-2.png'; import case3 from '../../assets/diagrams/case-3.png'; import case4 from '../../assets/diagrams/case-4.png'; export const LoadCaseDiagrams = () => { const [activeTab, setActiveTab] = useState(1); const renderContent = () => { switch (activeTab) { case 1: return ; case 2: return ; case 3: return ; case 4: return ; default: return null; } }; return (
Load Case Visualization
{/* Tabs */}
{renderContent()}
); }; const LoadCaseImage = ({ src, label }: { src: string; label: string }) => { const { results } = useWindStore(); // Safety check if results aren't ready if (!results) { return (
Calculating Parameters...
); } const { meanRoofHeight, zoneWidth } = results; const h = meanRoofHeight.toFixed(1); const a = zoneWidth.toFixed(1); const two_a = (zoneWidth * 2).toFixed(1); return (
{/* Left: Image */}
{label}
{label}
{/* Right: Info Panel */}
Zoning Parameters
Mean Roof Height (h) = {h} ft
Zone Width (a) = {a} ft
End Width (2a) = {two_a} ft
0.6h = {(meanRoofHeight * 0.6).toFixed(1)} ft
); };