From 2d8ac9597827a0e4dbd7590c0677cb334835ae5c Mon Sep 17 00:00:00 2001 From: BGV <26331505+bgv2@users.noreply.github.com> Date: Sun, 30 Mar 2025 01:15:48 -0400 Subject: [PATCH] texting works --- React/src/app/call/page.tsx | 21 ++++++++++++++++++++- React/src/app/page.tsx | 17 ----------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/React/src/app/call/page.tsx b/React/src/app/call/page.tsx index 4eb2755..5a76e36 100644 --- a/React/src/app/call/page.tsx +++ b/React/src/app/call/page.tsx @@ -12,6 +12,25 @@ const CallPage = () => { return () => clearInterval(interval); }, []); + + const handleEmergency = async () => { + // send texts + const response = await fetch("/api/sendMessage", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + message: `yo i need help`, + }), + }); + + if (!response.ok) { + console.error("Error sending message:", response.statusText); + return; + } + } + return (
@@ -19,7 +38,7 @@ const CallPage = () => { Call with a Definitely Real Person
{callDuration}s
- +