import React, { useState } from 'react'; import styles from './MonitoringPage.module.css'; /** * HELPER: Unified sender function * In a real app, you might move this to a /services or /hooks folder */ const sendUserInterrupt = async (type: string, context: string) => { try { const response = await fetch("http://localhost:8000/button_pressed", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ type, context }), }); if (!response.ok) throw new Error("Backend response error"); console.log(`Interrupt Sent - Type: ${type}, Context: ${context}`); } catch (err) { console.error(`Failed to send interrupt:`, err); } }; // --- GESTURE COMPONENT --- export const GestureControls: React.FC = () => { const [selectedGesture, setSelectedGesture] = useState("animations/Stand/BodyTalk/Speaking/BodyTalk_1"); const gestures = [ { label: "Body Talk 1", value: "animations/Stand/BodyTalk/Speaking/BodyTalk_1" }, { label: "Thinking 8", value: "animations/Stand/Gestures/Thinking_8" }, { label: "Thinking 1", value: "animations/Stand/Gestures/Thinking_1" }, { label: "Happy", value: "animations/Stand/Emotions/Positive/Happy_1" }, ]; return (
No {title.toLowerCase()} defined.
)}