From d36eaffafbad03065a7ded135e72939c07fb781e Mon Sep 17 00:00:00 2001 From: Chris-1010 <122332721@umail.ucc.ie> Date: Wed, 26 Feb 2025 13:23:42 +0000 Subject: [PATCH] REFACTOR: Update navbar position in project component hierarchy; UPDATE: Add navbar 'no-searchbar' variant; + last commit - MINOR: Handle of new ChatContext --- frontend/src/App.tsx | 2 - .../components/Layout/DynamicPageContent.tsx | 6 +- frontend/src/components/Layout/Logo.tsx | 2 +- frontend/src/components/Navigation/Navbar.tsx | 85 +++++++++---------- .../src/components/Stream/StreamerRoute.tsx | 8 +- frontend/src/pages/CategoryPage.tsx | 11 +-- frontend/src/pages/HomePage.tsx | 14 +-- 7 files changed, 57 insertions(+), 71 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 72b2a6b..1c11065 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -14,7 +14,6 @@ import { SidebarProvider } from "./context/SidebarContext"; import { QuickSettingsProvider } from "./context/QuickSettingsContext"; import StreamDashboardPage from "./pages/StreamDashboardPage"; import { Brightness } from "./context/BrightnessContext"; -import Sidebar from "./components/Navigation/Sidebar"; import LoadingScreen from "./components/Layout/LoadingScreen"; import Following from "./pages/Following"; @@ -61,7 +60,6 @@ function App() { - {isLoggedIn && window.innerWidth > 900 && } { children: React.ReactNode; - navbarVariant?: "home" | "no-navbar" | "default"; + navbarVariant?: "home" | "no-searchbar" | "default"; className?: string; contentClassName?: string; style?: React.CSSProperties; @@ -20,8 +20,8 @@ const DynamicPageContent: React.FC = ({ const { showSideBar } = useSidebar(); return ( -
- {navbarVariant !== "no-navbar" && } +
+
= ({ variant = "default" }) => { @@ -56,55 +57,53 @@ const Navbar: React.FC = ({ variant = "default" }) => { return (