diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index 6a9ee2d..d20512e 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -6009,6 +6009,7 @@
"version": "2.2.7",
"resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.2.7.tgz",
"integrity": "sha512-faI3cZbSdFb8yv9dhDTmGwclW0vk0z5o1cia+kf7gCbaCwHI5e+7tP57mJUv22pNcNbeA62GSrPpfrUfdXcQ6g==",
+ "license": "MIT",
"dependencies": {
"immer": "^10.0.3",
"redux": "^5.0.1",
@@ -22110,6 +22111,7 @@
"version": "9.1.2",
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.1.2.tgz",
"integrity": "sha512-0OA4dhM1W48l3uzmv6B7TXPCGmokUU4p1M44DGN2/D9a1FjVPukVjER1PcPX97jIg6aUeLq1XJo1IpfbgULn0w==",
+ "license": "MIT",
"dependencies": {
"@types/use-sync-external-store": "^0.0.3",
"use-sync-external-store": "^1.0.0"
@@ -22165,6 +22167,7 @@
"version": "6.26.2",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.26.2.tgz",
"integrity": "sha512-z7YkaEW0Dy35T3/QKPYB1LjMK2R1fxnHO8kWpUMTBdfVzZrWOiY9a7CtN8HqdWtDUWd5FY6Dl8HFsqVwH4uOtQ==",
+ "license": "MIT",
"dependencies": {
"@remix-run/router": "1.19.2",
"react-router": "6.26.2"
diff --git a/frontend/src/App.js b/frontend/src/App.js
index ae5fccb..9955c56 100644
--- a/frontend/src/App.js
+++ b/frontend/src/App.js
@@ -1,5 +1,9 @@
import React from "react";
+
+import { Routes, Route } from "react-router-dom";
+
import { Routes, Route, useLocation } from "react-router-dom"; // Resolved spacing issue
+
import Navbar from "./components/Navbar/Navbar.js";
import Hom from "./pages/Home/Hom.js";
import Educ from "./components/Education/Educ.js";
@@ -11,7 +15,7 @@ import Login from "./components/Login/Login.js";
import Signup from "./components/Signup/Signup.js";
import Footer from "./components/Footer/Footer.js";
import About from "./pages/About/About.js";
-
+import Loan from "./pages/Loan/Loan.js"; // Ensure the path is correct
function App() {
const location = useLocation();
return (
@@ -21,14 +25,15 @@ function App() {
} />
+ } /> {/* Corrected this line */}
} />
} />
} />
} />
} />
} />
- }/>
- } />
+ } />
+ } /> {/* Use lowercase for consistency */}
{location.pathname !== "/login" && location.pathname.toLowerCase() !== "/signup" && }
diff --git a/frontend/src/components/Loan/Loan.js b/frontend/src/components/Loan/Loan.js
deleted file mode 100644
index 230a2f1..0000000
--- a/frontend/src/components/Loan/Loan.js
+++ /dev/null
@@ -1,10 +0,0 @@
-import React from 'react'
-
-function Loan () {
- return (
- <>
-
Loans
- >
- )
-}
-export default Loan;
\ No newline at end of file
diff --git a/frontend/src/components/Navbar/Navbar.js b/frontend/src/components/Navbar/Navbar.js
index f34da81..cfb2770 100644
--- a/frontend/src/components/Navbar/Navbar.js
+++ b/frontend/src/components/Navbar/Navbar.js
@@ -25,6 +25,15 @@ function Navbar() {
Contact Us
+
+
+
+
× {/* Close icon */}
diff --git a/frontend/src/pages/Home/Hom.js b/frontend/src/pages/Home/Hom.js
index ec7fe52..b90ccdc 100644
--- a/frontend/src/pages/Home/Hom.js
+++ b/frontend/src/pages/Home/Hom.js
@@ -97,7 +97,13 @@ export default function Hom() {
{item.description}
-
{item.action}
+ {item.title === "Loans and Grants" && (
+
{item.action}
+ )}
+
+ {item.title !== "Loans and Grants" && (
+
{item.action}
+ )}
))}
diff --git a/frontend/src/pages/Loan/Loan.css b/frontend/src/pages/Loan/Loan.css
new file mode 100644
index 0000000..62eb848
--- /dev/null
+++ b/frontend/src/pages/Loan/Loan.css
@@ -0,0 +1,166 @@
+/* LoanPage.css */
+
+.loan-container {
+ max-width: 900px;
+ margin: 0 auto;
+ padding: 20px; /* Reduced padding for smaller devices */
+ background-color: #f8f9fa;
+ border-radius: 10px;
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
+}
+
+.loan-title {
+ font-size: 2rem; /* Adjusted for smaller screens */
+ margin-bottom: 30px; /* Reduced space below the title */
+ color: #2B4B77;
+ text-align: center;
+ text-transform: uppercase;
+ letter-spacing: 1px;
+}
+
+.horizontal-cards {
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 30px; /* Reduced space below the horizontal cards */
+ flex-wrap: wrap; /* Allow wrapping to next line if necessary */
+}
+
+.loan-section {
+ background-color: #ffffff;
+ border-radius: 8px;
+ padding: 20px;
+ margin: 10px;
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+ transition: transform 0.2s;
+ flex: 1 1 30%; /* Adjust card size and allow wrapping */
+ min-width: 260px; /* Minimum width for smaller screens */
+}
+
+.loan-section:hover {
+ transform: translateY(-5px);
+}
+
+.loan-section h2 {
+ font-size: 1.5rem; /* Adjusted for smaller screens */
+ color: #2B4B77;
+ margin-bottom: 10px;
+}
+
+.loan-section p {
+ font-size: 0.9rem; /* Adjusted for smaller screens */
+ margin-bottom: 10px;
+ line-height: 1.5; /* Better readability */
+}
+
+.loan-types-container {
+ display: flex;
+ justify-content: space-between;
+ margin: 20px 0;
+}
+
+.loan-type {
+ background-color: #ffffff;
+ border-radius: 8px;
+ padding: 15px;
+ flex: 1;
+ margin: 0 10px;
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+ text-align: center;
+}
+
+.loan-button {
+ background-color: #2B4B77;
+ color: white;
+ border: none;
+ border-radius: 5px;
+ padding: 10px 15px; /* Adjusted for smaller screens */
+ font-size: 0.9rem; /* Adjusted for smaller screens */
+ cursor: pointer;
+ transition: background-color 0.3s, transform 0.2s;
+ display: inline-block;
+ text-decoration: none;
+ margin-top: 10px;
+}
+
+.loan-button:hover {
+ background-color: #1f3d5b;
+ transform: scale(1.05);
+}
+
+.tips {
+ margin-top: 20px;
+}
+
+.loan-calculator {
+ margin-top: 40px;
+ background-color: #ffffff;
+ border-radius: 8px;
+ padding: 25px;
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+}
+
+.calculator-form {
+ display: flex;
+ flex-direction: column; /* Stack inputs vertically */
+}
+
+.calculator-form label {
+ margin-bottom: 15px;
+ font-size: 1rem;
+}
+
+.calculator-form input {
+ padding: 10px;
+ border: 1px solid #ccc;
+ border-radius: 5px;
+ font-size: 1rem;
+}
+
+.calculator-result {
+ margin-top: 20px;
+ font-size: 1.5rem;
+ color: #2B4B77;
+}
+
+/* Media Queries for Responsiveness */
+@media (max-width: 768px) {
+ .loan-title {
+ font-size: 1.8rem; /* Smaller title for tablets and phones */
+ }
+
+ .horizontal-cards {
+ flex-direction: column; /* Stack cards vertically */
+ }
+
+ .loan-section {
+ flex: 1 1 100%; /* Full width on small screens */
+ margin-bottom: 20px; /* Space between stacked cards */
+ }
+
+ .loan-button {
+ padding: 10px; /* Smaller button padding */
+ font-size: 0.85rem; /* Smaller button font size */
+ }
+
+ .calculator-form input {
+ font-size: 0.9rem; /* Smaller input font size */
+ }
+}
+
+@media (max-width: 480px) {
+ .loan-title {
+ font-size: 1.6rem; /* Smaller title for phones */
+ }
+
+ .loan-section h2 {
+ font-size: 1.4rem; /* Smaller heading for cards */
+ }
+
+ .loan-section p {
+ font-size: 0.85rem; /* Smaller paragraph font size */
+ }
+
+ .calculator-result {
+ font-size: 1.2rem; /* Smaller result font size */
+ }
+}
diff --git a/frontend/src/pages/Loan/Loan.js b/frontend/src/pages/Loan/Loan.js
new file mode 100644
index 0000000..8d8cf1c
--- /dev/null
+++ b/frontend/src/pages/Loan/Loan.js
@@ -0,0 +1,111 @@
+// src/LoanPage.js
+import React, { useState } from 'react';
+import './Loan.css'; // Import your custom CSS file
+
+const Loan = () => {
+ const [loanAmount, setLoanAmount] = useState('');
+ const [interestRate, setInterestRate] = useState('');
+ const [loanTerm, setLoanTerm] = useState('');
+ const [totalPayment, setTotalPayment] = useState(null);
+
+ const calculateTotalPayment = () => {
+ const principal = parseFloat(loanAmount);
+ const calculatedInterest = (principal * (parseFloat(interestRate) / 100)) * parseFloat(loanTerm);
+ const total = principal + calculatedInterest;
+ setTotalPayment(total.toFixed(2));
+ };
+
+ return (
+
+
Understanding Loans and Grants
+
+
+
+ What is a Loan?
+
+ A loan is a sum of money that is borrowed and is expected to be paid back with interest.
+ Loans can be secured (backed by collateral) or unsecured (not backed by collateral).
+
+
+ Learn More
+
+
+
+
+ What is a Grant?
+
+ A grant is a financial award given by a government agency, organization, or individual for a specific purpose,
+ and it does not need to be paid back.
+
+
+ Learn More
+
+
+
+
+ Types of Loans
+
+ Personal Loans
+ Student Loans
+ Mortgage Loans
+ Auto Loans
+
+
+ View Details
+
+
+
+
+
+ Tips for Applying for Loans and Grants
+
+ Check your credit score before applying.
+ Research various options to find the best terms.
+ Gather necessary documentation in advance.
+ Be clear about your purpose and how you plan to use the funds.
+
+
+
+
+
+ );
+};
+
+export default Loan;