From f678c605a2960bafa95511bad8ad46e1c9254f5b Mon Sep 17 00:00:00 2001 From: Shovon Date: Sat, 20 Sep 2025 23:11:53 +0600 Subject: [PATCH] Add ai based user profile analysis ,info pages, footer, Introduced About, Contact, Terms, and Privacy pages with detailed content. Added a global Footer component with dynamic Game of Thrones quotes and social links, replacing the previous Landing page footer. Implemented UserProfileAnalysis component and integrated AI-powered profile analysis in UserProfile. Refactored App routing to use new info pages and display the Footer on all pages except login/register. --- frontend/src/App.jsx | 23 +- frontend/src/components/Footer.jsx | 118 +++++++ .../src/components/UserProfileAnalysis.jsx | 136 ++++++++ frontend/src/pages/About.jsx | 180 +++++++++++ frontend/src/pages/Contact.jsx | 305 ++++++++++++++++++ frontend/src/pages/Landing.jsx | 32 -- frontend/src/pages/Privacy.jsx | 171 ++++++++++ frontend/src/pages/Terms.jsx | 148 +++++++++ frontend/src/pages/UserProfile.jsx | 77 ++++- frontend/src/services/profileAnalysis.js | 140 ++++++++ 10 files changed, 1293 insertions(+), 37 deletions(-) create mode 100644 frontend/src/components/Footer.jsx create mode 100644 frontend/src/components/UserProfileAnalysis.jsx create mode 100644 frontend/src/pages/About.jsx create mode 100644 frontend/src/pages/Contact.jsx create mode 100644 frontend/src/pages/Privacy.jsx create mode 100644 frontend/src/pages/Terms.jsx create mode 100644 frontend/src/services/profileAnalysis.js diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index db3e831..bfad0c8 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -3,6 +3,7 @@ import { AuthProvider } from "./context/AuthContext"; import { BrowserRouter as Router, Routes, Route, useLocation, Navigate } from "react-router-dom"; import Navbar from "./components/Navbar"; import Chatbot from "./components/Chatbot"; +import Footer from "./components/Footer"; // Pages import Landing from "./pages/Landing"; @@ -25,6 +26,12 @@ import ForumFeed from "./pages/ForumFeed"; import ForumPostDetail from "./pages/ForumPostDetail.jsx"; import ForumPostCreateEdit from "./pages/ForumPostCreateEdit"; +// Info pages +import About from "./pages/About"; +import Contact from "./pages/Contact"; +import Terms from "./pages/Terms"; +import Privacy from "./pages/Privacy"; + // Placeholder pages function Placeholder({ title }) { return

{title} (Coming Soon)

; @@ -51,10 +58,10 @@ export default function App() { } /> } /> } /> - } /> - } /> - } /> - } /> + } /> + } /> + } /> + } /> } /> } /> } /> @@ -85,6 +92,7 @@ export default function App() { } /> } /> + @@ -96,6 +104,13 @@ function NavbarVisibility() { return ; } +// Show Footer on all pages except login/register +function FooterVisibility() { + const { pathname } = useLocation(); + if (pathname === "/login" || pathname === "/register") return null; + return