Fix: Correct logo light/dark switching - dark_background for light mode, light_background for dark mode

This commit is contained in:
2026-07-07 15:23:05 +05:30
parent 6b0025408e
commit fe73bce834
8 changed files with 49 additions and 58 deletions

View File

@@ -3,9 +3,9 @@
import { ReactNode, useState, useEffect, useRef } from "react"
import { BookOpen, LayoutDashboard, Settings, FileText, Activity, LineChart, Trophy, LogOut, User, ChevronUp, Lock } from "lucide-react"
import Link from "next/link"
import Image from "next/image"
import { usePathname } from "next/navigation"
import { LanguageToggle } from "@/components/LanguageToggle"
import { Logo } from "@/components/Logo"
import { ThemeToggle } from "@/components/ThemeToggle"
import { TierBadge } from "@/components/TierBadge"
import { StreakCounter } from "@/components/StreakCounter"
@@ -40,26 +40,7 @@ export default function DashboardLayout({ children }: { children: ReactNode }) {
{/* Sidebar */}
<aside className="w-64 border-r border-border bg-background flex flex-col hidden md:flex">
<div className="px-6 py-5">
<Link href="/dashboard" className="block relative h-14 w-full hover:opacity-90 transition-opacity">
<div className="absolute inset-0 dark:hidden">
<Image
src="/PragatiVeer_Logo/SVG_Logos/Rectangular_dark_background.svg"
alt="PragatiVeer"
fill
className="object-contain object-left scale-110 origin-left"
priority
/>
</div>
<div className="absolute inset-0 hidden dark:block">
<Image
src="/PragatiVeer_Logo/SVG_Logos/Rectangular_dark_background.svg"
alt="PragatiVeer"
fill
className="object-contain object-left scale-110 origin-left"
priority
/>
</div>
</Link>
<Logo href="/dashboard" className="w-full" imageClassName="object-contain object-left scale-110 origin-left" height={56} />
</div>
<nav className="flex-1 px-4 space-y-1.5 mt-4 overflow-y-auto">
<NavItem href="/dashboard" icon={<LayoutDashboard size={18} />} label="Overview" active={pathname === "/dashboard"} />