From 57c954cbcd7f175c0347c04154a12154eeb0afb4 Mon Sep 17 00:00:00 2001 From: BGV <26331505+bgv2@users.noreply.github.com> Date: Sun, 30 Mar 2025 11:10:23 -0400 Subject: [PATCH] install twilio, gps coords in message --- React/package.json | 3 ++- React/src/app/call/page.tsx | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/React/package.json b/React/package.json index 0d75192..685f7a2 100644 --- a/React/package.json +++ b/React/package.json @@ -13,7 +13,8 @@ "mongoose": "^8.13.1", "next": "15.2.4", "react": "^19.1.0", - "react-dom": "^19.1.0" + "react-dom": "^19.1.0", + "twilio": "^5.5.1" }, "devDependencies": { "@skeletonlabs/skeleton": "^3.1.1", diff --git a/React/src/app/call/page.tsx b/React/src/app/call/page.tsx index b0cbb5b..efea5b4 100644 --- a/React/src/app/call/page.tsx +++ b/React/src/app/call/page.tsx @@ -78,14 +78,16 @@ function CallPage() { "Content-Type": "application/json", }, body: JSON.stringify({ - message: `John Smith needs help.`, + message: `John Smith needs help. His GPS location is: https://www.google.com/maps/search/?api=1&query=38.03163938795633,-78.51085551716174`, }), }); if (!response.ok) { console.error("Error sending message:", response.statusText); return; - } + } else { + alert("Emergency message sent successfully."); + } } return (