- {localStorage?.getItem('token') ? (
-
+ {isAuthenticated ? (
+ <>
+ {/* Profile Avatar with Name */}
+
+ {/* Check if the user has an avatar, else use a placeholder */}
+ {user?.avatar ? (
+

+ ) : (
+
+
+
+ )}
+
+ {user?.name || user?.hospitalName}
+
+
+
+
+ >
) : (
- {
to="/register"
>
Register
+ */}
+ {
+ e.currentTarget.style.transform = 'scale(1.1)';
+ e.currentTarget.style.boxShadow =
+ '0px 8px 16px rgba(0, 0, 0, 0.4)';
+ }}
+ onMouseLeave={(e) => {
+ e.currentTarget.style.transform = 'scale(1)';
+ e.currentTarget.style.boxShadow =
+ '0px 4px 8px rgba(0, 0, 0, 0.2)';
+ }}
+ className="flex gap-2 items-center px-5 py-1 rounded-lg font-bold"
+ to="/login"
+ >
+
+ (e.currentTarget.style.transform =
+ 'rotate(360deg) scale(1.2)')
+ }
+ onMouseLeave={(e) =>
+ (e.currentTarget.style.transform = 'rotate(0deg) scale(1)')
+ }
+ />{' '}
+ Login
+
+
+ {
+ e.currentTarget.style.transform = 'scale(1.1)';
+ e.currentTarget.style.boxShadow =
+ '0px 8px 16px rgba(0, 0, 0, 0.4)';
+ }}
+ onMouseLeave={(e) => {
+ e.currentTarget.style.transform = 'scale(1)';
+ e.currentTarget.style.boxShadow =
+ '0px 4px 8px rgba(0, 0, 0, 0.2)';
+ }}
+ className="flex gap-2 items-center px-5 py-1 rounded-lg font-bold"
+ to="/register"
+ >
+
+ (e.currentTarget.style.transform =
+ 'rotate(-360deg) scale(1.2)')
+ }
+ onMouseLeave={(e) =>
+ (e.currentTarget.style.transform = 'rotate(0deg) scale(1)')
+ }
+ />{' '}
+ Register
)}
@@ -362,9 +440,7 @@ const Navbar = ({ isAuthenticated, user, handleLogout }) => {
};
Navbar.propTypes = {
- isAuthenticated: PropTypes.bool,
user: PropTypes.object,
- handleLogout: PropTypes.func,
};
export default Navbar;
diff --git a/client/src/components/PreLoader.jsx b/client/src/components/PreLoader.jsx
new file mode 100644
index 0000000..c30e523
--- /dev/null
+++ b/client/src/components/PreLoader.jsx
@@ -0,0 +1,22 @@
+import "../styles/Preloader.css";
+
+const Preloader = () => {
+ return (
+
+
+
+ );
+};
+
+export default Preloader;
diff --git a/client/src/pages/About.jsx b/client/src/pages/About.jsx
index a254458..ec2ffaf 100644
--- a/client/src/pages/About.jsx
+++ b/client/src/pages/About.jsx
@@ -10,13 +10,10 @@ import { useRecoilValue } from 'recoil'; // Import Recoil
import { mode } from '../store/atom'; // Import the mode atom
import luson from '../assets/images/luson.jpg';
-
-
-
// Team member data
const teamMembers = [
{
- id:1,
+ id: 1,
name: 'Luson Basumatary',
role: 'Lead Developer || Founder',
description:
@@ -27,7 +24,7 @@ const teamMembers = [
email: 'mailto:luson@example.com',
},
{
- id:2,
+ id: 2,
name: 'Rohit Bansal',
role: 'Frontend Developer',
description:
@@ -38,7 +35,7 @@ const teamMembers = [
email: 'mailto:luson@example.com',
},
{
- id:3,
+ id: 3,
name: 'Kalpesh Jain',
role: 'UI/UX Designer',
description:
@@ -49,7 +46,7 @@ const teamMembers = [
email: 'mailto:luson@example.com',
},
{
- id:4,
+ id: 4,
name: 'Simranpreet Kaur',
role: 'Graphic Designer',
description:
@@ -60,7 +57,7 @@ const teamMembers = [
email: 'mailto:luson@example.com',
},
{
- id:5,
+ id: 5,
name: 'Kartik Kaushal',
role: 'Healthcare Researcher',
description:
@@ -71,7 +68,7 @@ const teamMembers = [
email: 'mailto:luson@example.com',
},
{
- id:6,
+ id: 6,
name: 'Shubham',
role: 'Technology Researcher',
description:
@@ -118,11 +115,13 @@ const AboutPage = () => {
{/* Two-box section for Vision and Mission */}
-
- Our Vision
-
- At Med-Space, we envision a world where accessing outpatient
- care is as simple as a few clicks. By leveraging technology and
+
+
+ Our Vision
+
+
+ At Med-Space, we envision a world where accessing outpatient care
+ is as simple as a few clicks. By leveraging technology and
innovation, we aim to provide a platform that bridges the gap
between patients and healthcare providers, making high-quality
care accessible to everyone, anywhere. We strive to ensure that
@@ -131,8 +130,10 @@ const AboutPage = () => {
- Our Mission
-
+
+ Our Mission
+
+
Our mission is to revolutionize outpatient care by creating a
comprehensive, easy-to-use platform that empowers patients and
healthcare providers alike. We are committed to building
@@ -146,21 +147,19 @@ const AboutPage = () => {
Meet our awesome team
- {teamMembers.map((member, index) => (
-
-
-
-
- {member.name}
-
- {member.role}
-
- {/* Social Media Icons */}
-
+ {teamMembers.map((member, index) => (
+
+
+
+ {member.name}
+ {member.role}
+
+ {/* Social Media Icons */}
+ {/*
-
-
-{member.description}
-
- {expandedIds[member.id]
- ? member.description
- : getLimitedText(member.description, charLimit)}
-
- {member.description.length > charLimit && (
- toggleReadMore(member.id)}
- className="text-blue-500 cursor-pointer ml-1 text-[12px]"
- >
- {expandedIds[member.id] ? 'Read Less' : 'Read More'}
-
- )}
-
-
-
-
-
- ))}
+ */}
+
+
+
+
+
+
+
+
+
+ {member.description}
+
+ {expandedIds[member.id]
+ ? member.description
+ : getLimitedText(member.description, charLimit)}
+
+ {member.description.length > charLimit && (
+ toggleReadMore(member.id)}
+ className="text-blue-500 cursor-pointer ml-1 text-[12px]"
+ >
+ {expandedIds[member.id] ? 'Read Less' : 'Read More'}
+
+ )}
+
+
+
+
+ ))}
{/* First Stat */}
@@ -296,8 +425,10 @@ const AboutPage = () => {
Nearby Hospitals
- Our Amazing Open Source Contributors
-
+
+ Our Amazing Open Source Contributors
+
+
(dark === 'dark' ? '#e2e8f0' : '#161D6F')};
line-height: 1.6;
-
`;
const MissionTitle = styled.h2`
@@ -418,18 +547,17 @@ const SocialIcons = styled.div`
a {
&:hover {
- color:${({ dark }) => (dark === 'dark' ? 'white' : 'blue')}; /* Optional hover effect */
+ color: ${({ dark }) =>
+ dark === 'dark' ? 'white' : 'blue'}; /* Optional hover effect */
}
}
-
-
`;
const Name = styled.h4`
font-size: 1.25rem;
margin-bottom: 0.2rem;
- color: ${({ dark }) => (dark === 'dark' ? '#B7E0FF' : '#333')};
- font-weight:bold;
+ color: ${({ dark }) => (dark === 'dark' ? '#B7E0FF' : '#333')};
+ font-weight: bold;
`;
const Role = styled.h5`
@@ -442,7 +570,6 @@ const Description = styled.p`
font-size: 0.9rem;
color: ${({ dark }) => (dark === 'dark' ? 'white' : '#666')};
line-height: 1.4;
-
`;
// Community Section
@@ -473,13 +600,12 @@ const JoinUsText = styled.p`
color: ${({ dark }) => (dark === 'dark' ? '#e2e8f0' : '#666')};
`;
-
const Title = styled.h3`
font-size: 2.5rem;
color: ${({ dark }) => (dark === 'dark' ? '#f6e05e' : '#c229b8')};
text-align: center;
margin-bottom: 2rem;
- font-weight:bold;
+ font-weight: bold;
`;
const StatsSection = styled.div`
diff --git a/client/src/pages/HospitalsAround.jsx b/client/src/pages/HospitalsAround.jsx
index 3add8ee..62c9c9e 100644
--- a/client/src/pages/HospitalsAround.jsx
+++ b/client/src/pages/HospitalsAround.jsx
@@ -7,7 +7,7 @@ import ReactDOMServer from 'react-dom/server'; // Import ReactDOMServer to rende
import { useRecoilState } from 'recoil';
import { mode } from '../store/atom';
import 'leaflet-routing-machine'; // Import Leaflet Routing Machine
-
+import Skeleton from '@mui/material/Skeleton';
import Navbar from '../components/Navbar';
import '../styles/Nearbyhospitals.css';
@@ -302,8 +302,23 @@ const HospitalsAround = () => {
className="h-[50vh] w-full md:w-[70%] md:h-screen "
>
+ ) : locationError ? (
+
+ Having trouble fetching location. Please enable location access in
+ your browser and reload the page to retry.
+
) : (
- locationError?Having trouble fetching location. Please enable location access in your browser and reload the page to retry.
:Fetching location...
+
+
+
+
)}
>
diff --git a/client/src/pages/LabTest.jsx b/client/src/pages/LabTest.jsx
index cd3b854..4c6d024 100644
--- a/client/src/pages/LabTest.jsx
+++ b/client/src/pages/LabTest.jsx
@@ -17,6 +17,8 @@ import usgImage from '../assets/usg.png';
import Navbar from '../components/Navbar';
import { mode } from '../store/atom'; // Importing the atom for mode
import Footer from '../components/Footer';
+import { Rating } from '@mui/material';
+import { useNavigate } from 'react-router-dom';
const LabTestMedipedia = () => {
const [currentItem, setCurrentItem] = useState(3);
@@ -24,6 +26,8 @@ const LabTestMedipedia = () => {
const [isLoading, setIsLoading] = useState(false);
const dark = useRecoilValue(mode); // Using Recoil state for dark mode
+ const navigate = useNavigate();
+
useEffect(() => {
setTimeout(() => {
setIsVisible(true);
@@ -37,10 +41,10 @@ const LabTestMedipedia = () => {
title: 'Complete Blood Count (CBC)',
reportTime: '2-days',
cost: '$25',
- rating: 4.5,
+ rating: 4,
testType: 'Blood Test',
description:
- 'A Complete Blood Count (CBC) is a common blood test that measures the levels of different types of cells in your blood, including red blood cells, white blood cells, hemoglobin, hematocrit, and platelets. This test is essential for diagnosing various conditions like infections, anemia, and other blood disorders.',
+ 'A Complete Blood Count (CBC) is a common blood test that measures the levels of different types of cells in your blood. This test Measures count of red blood cells, white blood cells, hemoglobin, hematocrit, and platelets.',
},
{
id: 2,
@@ -48,7 +52,7 @@ const LabTestMedipedia = () => {
title: 'Lipid Profile',
reportTime: '3-days',
cost: '$35',
- rating: 4.7,
+ rating: 3,
testType: 'Blood Test',
description:
'A Lipid Profile measures the levels of cholesterol and triglycerides in your blood. It includes total cholesterol, HDL (good cholesterol), LDL (bad cholesterol), and triglycerides. This test helps assess your risk of developing cardiovascular disease.',
@@ -59,7 +63,7 @@ const LabTestMedipedia = () => {
title: 'Blood Glucose Test',
reportTime: '1-day',
cost: '$20',
- rating: 4.6,
+ rating: 5,
testType: 'Blood Test',
description:
'The Blood Glucose Test measures the level of glucose (sugar) in your blood. It is vital for diagnosing and managing diabetes or prediabetes. Regular monitoring of blood glucose levels can prevent severe complications from diabetes.',
@@ -70,10 +74,10 @@ const LabTestMedipedia = () => {
title: 'Thyroid Test',
reportTime: '2-days',
cost: '$30',
- rating: 4.8,
+ rating: 5,
testType: 'Blood Test',
description:
- 'The Thyroid Test checks your thyroid function by measuring levels of T3, T4, and TSH hormones in your blood. Thyroid hormones regulate your metabolism, energy levels, and mood. This test can detect conditions such as hyperthyroidism or hypothyroidism.',
+ 'The Thyroid Test checks your thyroid function by measuring levels of T3, T4, and TSH hormones in your blood. This test can detect conditions such as hyperthyroidism or hypothyroidism.',
},
{
id: 5,
@@ -81,7 +85,7 @@ const LabTestMedipedia = () => {
title: 'Hemoglobin Blood Test',
reportTime: '2-days',
cost: '$18',
- rating: 4.4,
+ rating: 4,
testType: 'Blood Test',
description:
'The Hemoglobin Test measures the amount of hemoglobin, a protein in red blood cells that carries oxygen to tissues. It is often used to diagnose anemia and assess the overall health of your red blood cells.',
@@ -92,7 +96,7 @@ const LabTestMedipedia = () => {
title: 'Urine Test',
reportTime: '3-days',
cost: '$15',
- rating: 4.3,
+ rating: 3,
testType: 'Urine Test',
description:
'A Urine Test analyzes various components of your urine, such as glucose, proteins, and ketones, to detect abnormalities that may indicate conditions like kidney disease, diabetes, or urinary tract infections.',
@@ -103,10 +107,10 @@ const LabTestMedipedia = () => {
title: 'Sodium Test',
reportTime: '1-day',
cost: '$22',
- rating: 4.5,
+ rating: 3,
testType: 'Blood Test',
description:
- 'The Sodium Test measures the sodium level in your blood, which is crucial for maintaining fluid balance, nerve function, and muscle activity. Abnormal levels can indicate dehydration, kidney problems, or adrenal issues.',
+ 'The Sodium Test measures the sodium level in your blood, which is crucial for maintaining fluid balance, nerve function, and muscle activity. Abnormal levels can indicate dehydration or kidney problems.',
},
{
id: 8,
@@ -114,7 +118,7 @@ const LabTestMedipedia = () => {
title: 'Hepatitis-B Test',
reportTime: '2-days',
cost: '$40',
- rating: 4.7,
+ rating: 5,
testType: 'Blood Test',
description:
'The Hepatitis B Test detects the presence of Hepatitis B virus (HBV) in the blood. This test is important for diagnosing acute or chronic Hepatitis B infections, which can lead to liver damage.',
@@ -125,7 +129,7 @@ const LabTestMedipedia = () => {
title: 'Potassium Test',
reportTime: '2-days',
cost: '$25',
- rating: 4.4,
+ rating: 4,
testType: 'Blood Test',
description:
'The Potassium Test measures the potassium level in your blood, which is essential for heart function and muscle contraction. Abnormal levels can cause irregular heartbeats or muscle weakness.',
@@ -136,10 +140,10 @@ const LabTestMedipedia = () => {
title: 'Rheumatoid Arthritis (RA) Test',
reportTime: '2-days',
cost: '$45',
- rating: 4.6,
+ rating: 4,
testType: 'Blood Test',
description:
- 'The Rheumatoid Arthritis Test detects rheumatoid factor (RF) or anti-cyclic citrullinated peptide (anti-CCP) antibodies in the blood. These are commonly present in people with rheumatoid arthritis, an autoimmune condition affecting joints.',
+ 'The Rheumatoid Arthritis Test detects rheumatoid factor (RF) or anti-cyclic citrullinated peptide (anti-CCP) antibodies in the blood. Rheumatoid arthritis is a long-term autoimmune disease that causes inflammation of joints and tissues.',
},
{
id: 11,
@@ -147,10 +151,10 @@ const LabTestMedipedia = () => {
title: 'Electrocardiogram (ECG)',
reportTime: '2-days',
cost: '$50',
- rating: 4.8,
+ rating: 5,
testType: 'Non-invasive',
description:
- 'An Electrocardiogram (ECG) records the electrical activity of the heart over time. It helps detect arrhythmias, heart attacks, and other heart conditions.',
+ "An Electrocardiogram (ECG) records the electrical activity of the heart over time. It is one of the first heart tests you 'll have. It helps detect arrhythmias, heart attacks, and other heart conditions. ECG results can help diagnose an unusually fast heart rate, called tachycardia, or an unusually slow heart rate,",
},
{
id: 12,
@@ -158,7 +162,7 @@ const LabTestMedipedia = () => {
title: 'Ultrasonography (USG)',
reportTime: '2-days',
cost: '$60',
- rating: 4.7,
+ rating: 3,
testType: 'Imaging',
description:
'Ultrasonography (USG) uses high-frequency sound waves to create images of internal organs, muscles, and other soft tissues. It is commonly used for diagnosing a wide range of medical conditions, including those affecting the abdomen, pelvis, and heart.',
@@ -213,17 +217,29 @@ const LabTestMedipedia = () => {
>
{test.description}
-