Skip to content

Commit 26d6c4b

Browse files
Add emergency public module
Expose an emergency safety module publicly aligned with Indian guidelines, including poison control dial, first aid guides, overdose info, and emergency report filing. Add page, routes, nav link, and public accessibility without login; integrate quick dial tel links and responsive UI. X-Lovable-Edit-ID: edt-d9207eb9-bf37-49bf-97e6-af6a50c9ed80
2 parents fb357db + f985f39 commit 26d6c4b

File tree

3 files changed

+607
-1
lines changed

3 files changed

+607
-1
lines changed

src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const Dashboard = lazy(() => import("./pages/Dashboard"));
1919
const DrugVerification = lazy(() => import("./pages/DrugVerification"));
2020
const DrugInteractions = lazy(() => import("./pages/DrugInteractions"));
2121
const PrescriptionScanner = lazy(() => import("./pages/PrescriptionScanner"));
22+
const Emergency = lazy(() => import("./pages/Emergency"));
2223
const MedicalHistory = lazy(() => import("./pages/MedicalHistory"));
2324
const SafetyScore = lazy(() => import("./pages/SafetyScore"));
2425
const PharmacistVerification = lazy(() => import("./pages/PharmacistVerification"));
@@ -57,6 +58,7 @@ const App = () => (
5758
<Routes>
5859
<Route path="/" element={<Index />} />
5960
<Route path="/auth" element={<Auth />} />
61+
<Route path="/emergency" element={<Emergency />} />
6062
<Route path="/dashboard" element={<ProtectedRoute><Dashboard /></ProtectedRoute>} />
6163
<Route path="/verify" element={<ProtectedRoute><DrugVerification /></ProtectedRoute>} />
6264
<Route path="/interactions" element={<ProtectedRoute><DrugInteractions /></ProtectedRoute>} />

src/components/Navigation.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Link, useLocation, useNavigate } from "react-router-dom";
22
import { cn } from "@/lib/utils";
3-
import { Shield, FileText, Activity, LogOut, User, ClipboardCheck, Database, Utensils, Menu, Settings, Moon, Bell, Lock, FlaskConical, MoreHorizontal, Pill } from "lucide-react";
3+
import { Shield, FileText, Activity, LogOut, User, ClipboardCheck, Database, Utensils, Menu, Settings, Moon, Bell, Lock, FlaskConical, MoreHorizontal, Pill, AlertCircle } from "lucide-react";
44
import { useAuth } from "@/contexts/AuthContext";
55
import { Button } from "./ui/button";
66
import { OptimizedImage } from "./OptimizedImage";
@@ -192,6 +192,14 @@ export function Navigation() {
192192
</Drawer>
193193
)}
194194

195+
{/* Emergency Button - Always Visible */}
196+
<Link to="/emergency">
197+
<Button variant="destructive" size={isMobile ? "icon" : "default"} className="font-semibold">
198+
<AlertCircle className="h-5 w-5" />
199+
{!isMobile && <span className="ml-2">Emergency</span>}
200+
</Button>
201+
</Link>
202+
195203
{user && <NotificationBell />}
196204

197205
{user && (

0 commit comments

Comments
 (0)