From ba614e4c91d9263336cc12c734f121e7a743b826 Mon Sep 17 00:00:00 2001
From: Pragyan <143019512+pragyanbhatt1213@users.noreply.github.com>
Date: Sat, 19 Oct 2024 20:44:14 +0530
Subject: [PATCH 1/2] Update HelpandSupport.jsx
---
frontend/src/Pages/HelpandSupport.jsx | 195 +++++++++++++++++++++++++-
1 file changed, 192 insertions(+), 3 deletions(-)
diff --git a/frontend/src/Pages/HelpandSupport.jsx b/frontend/src/Pages/HelpandSupport.jsx
index 71abb18..24c1a12 100644
--- a/frontend/src/Pages/HelpandSupport.jsx
+++ b/frontend/src/Pages/HelpandSupport.jsx
@@ -1,9 +1,198 @@
-import React from 'react';
+import React, { useState } from 'react';
+
+const SearchIcon = () => (
+
+
+
+);
+
+const PhoneIcon = () => (
+
+
+
+);
+
+const MailIcon = () => (
+
+
+
+);
+
+const ChevronDown = () => (
+
+
+
+);
+
+const ChevronUp = () => (
+
+
+
+);
+
+const EmergencyIcon = () => (
+
+
+
+);
+
+const EmergencyServiceCard = ({ title, number, description }) => (
+
+
+
+
{title}
+
+
{number}
+
{description}
+
+);
const HelpAndSupport = () => {
+ const [searchTerm, setSearchTerm] = useState('');
+ const [expandedQuestion, setExpandedQuestion] = useState(null);
+
+ const contactInfo = [
+ { type: 'phone', value: '+91 1800 123 4567', icon: PhoneIcon },
+ { type: 'phone', value: '+91 9876 543 210', icon: PhoneIcon },
+ { type: 'email', value: 'support@stationsaarthi.com', icon: MailIcon },
+ { type: 'email', value: 'info@stationsaarthi.com', icon: MailIcon },
+ ];
+
+ const emergencyServices = [
+ {
+ title: "Police",
+ number: "100",
+ description: "For immediate police assistance and emergencies"
+ },
+ {
+ title: "Ambulance",
+ number: "108",
+ description: "For medical emergencies and immediate medical assistance"
+ },
+ {
+ title: "Fire Brigade",
+ number: "101",
+ description: "For fire-related emergencies and rescue operations"
+ },
+ {
+ title: "Women Helpline",
+ number: "1091",
+ description: "24/7 women's safety and assistance helpline"
+ },
+ {
+ title: "Railway Protection Force",
+ number: "182",
+ description: "For security-related issues at railway stations"
+ }
+ ];
+
+ const basicQuestions = [
+ {
+ question: "What is StationSaarthi?",
+ answer: "StationSaarthi is a platform designed to enhance your Indian Railway Station experience, providing features like live train updates, navigation, and personalized recommendations."
+ },
+ {
+ question: "How does StationSaarthi work?",
+ answer: "Simply download the StationSaarthi app or visit our website to access our services. You can use our platform to get real-time train information, navigate within stations, find amenities, and more."
+ },
+ {
+ question: "Is StationSaarthi free to use?",
+ answer: "Yes, StationSaarthi is a free platform. You can use all of our features without any subscription fees."
+ },
+ {
+ question: "How can I check the arrival and departure times of my train?",
+ answer: "You can easily check your train's arrival and departure times by entering its number or name on our platform."
+ },
+ {
+ question: "Can I track the real-time location of my train?",
+ answer: "Yes, StationSaarthi provides real-time train tracking. You can see the exact location of your train on a map."
+ }
+ ];
+
+ const filteredBasicQuestions = basicQuestions.filter(q =>
+ q.question.toLowerCase().includes(searchTerm.toLowerCase())
+ );
+
+ const toggleQuestion = (index) => {
+ if (expandedQuestion === index) {
+ setExpandedQuestion(null);
+ } else {
+ setExpandedQuestion(index);
+ }
+ };
+
return (
-
-
Help and Support Page
+
+
Help and Support
+
+
+
+ {/* Main Content */}
+
+
+
Contact Information
+
+ {contactInfo.map((info, index) => (
+
+
+ {info.value}
+
+ ))}
+
+
+
+
+
+
setSearchTerm(e.target.value)}
+ className="w-full p-4 pl-12 text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500"
+ />
+
+
+
+
+
+
+
+
Basic Questions
+ {filteredBasicQuestions.map((q, index) => (
+
+
toggleQuestion(index)}
+ >
+ {q.question}
+ {expandedQuestion === index ? : }
+
+ {expandedQuestion === index && (
+
+ )}
+
+ ))}
+
+
+
+ {/* Emergency Services Sidebar */}
+
+
+
Emergency Services
+ {emergencyServices.map((service, index) => (
+
+ ))}
+
+
+
+
);
};
From fa0207c341761ee4bde4ddbb348a96daf3baec1e Mon Sep 17 00:00:00 2001
From: Pragyan <143019512+pragyanbhatt1213@users.noreply.github.com>
Date: Sat, 19 Oct 2024 20:44:37 +0530
Subject: [PATCH 2/2] Update App.jsx
---
frontend/src/App.jsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx
index 4c3b851..fe613ad 100644
--- a/frontend/src/App.jsx
+++ b/frontend/src/App.jsx
@@ -48,7 +48,7 @@ function App() {
} />
} />
} />
- } />
+ } />
{/* This route is just for testing protected routes it can be removed later when there is a route other than login or signup */}
@@ -103,4 +103,4 @@ export function ProtectedRoute() {
// If everything is fine, render the protected content
return ;
-}
\ No newline at end of file
+}