This commit is contained in:
EvanLin3141
2025-02-04 17:56:35 +00:00
5 changed files with 101 additions and 94 deletions

View File

@@ -1,6 +1,6 @@
import React, { useState, useEffect } from "react";
import Logo from "./Logo";
import Button, { ToggleButton } from "./Button";
import Button from "./Button";
import Sidebar from "./Sidebar";
import { Sidebar as SidebarIcon } from "lucide-react";
import {
@@ -15,19 +15,18 @@ import { useAuth } from "../../context/AuthContext";
interface NavbarProps {
variant?: "home" | "default";
isChatOpen?: boolean;
toggleChat?: () => void;
}
const Navbar: React.FC<NavbarProps> = ({
variant = "default",
isChatOpen,
toggleChat,
}) => {
const [showAuthModal, setShowAuthModal] = useState(false);
const { isLoggedIn } = useAuth();
<<<<<<< HEAD
const isVideoPage = location.pathname.includes("/EduGuru");
const [showSideBar, setShowSideBar] = useState(false);
=======
>>>>>>> 595190b0a004153d7253d5a44ae09e5d892a1bef
useEffect(() => {
if (showAuthModal) {
@@ -101,15 +100,6 @@ const Navbar: React.FC<NavbarProps> = ({
<SettingsIcon className="h-15 w-15 mr-1" />
Quick Settings
</Button>
{isVideoPage && (
<ToggleButton
onClick={toggleChat}
toggled={isChatOpen}
extraClasses="absolute top-[80px] right-[20px] text-[1rem] flex items-center flex-nowrap"
>
{isChatOpen ? "Hide Chat" : "Show Chat"}
</ToggleButton>
)}
<div id="search-bar" className="flex items-center">
<Input