fixed other states
This commit is contained in:
parent
9863eed98b
commit
8d09e96630
2 changed files with 10 additions and 17 deletions
|
|
@ -106,7 +106,7 @@ export function LayoutWrapper({ children }: { children: React.ReactNode }) {
|
||||||
onClick={toggleMenu}
|
onClick={toggleMenu}
|
||||||
className="h-8 w-8 hover:bg-muted rounded-lg flex items-center justify-center"
|
className="h-8 w-8 hover:bg-muted rounded-lg flex items-center justify-center"
|
||||||
>
|
>
|
||||||
<Bell size={20} className="text-muted-foreground" />
|
<Bell size={16} className="text-muted-foreground" />
|
||||||
{activeTasks.length > 0 && (
|
{activeTasks.length > 0 && (
|
||||||
<div className="header-notifications" />
|
<div className="header-notifications" />
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,15 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
||||||
import { Button } from "@/components/ui/button";
|
|
||||||
import {
|
import {
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
DropdownMenuContent,
|
DropdownMenuContent,
|
||||||
DropdownMenuItem,
|
|
||||||
DropdownMenuLabel,
|
DropdownMenuLabel,
|
||||||
DropdownMenuSeparator,
|
DropdownMenuSeparator,
|
||||||
DropdownMenuTrigger,
|
DropdownMenuTrigger,
|
||||||
} from "@/components/ui/dropdown-menu";
|
} from "@/components/ui/dropdown-menu";
|
||||||
import { useAuth } from "@/contexts/auth-context";
|
import { useAuth } from "@/contexts/auth-context";
|
||||||
import { LogIn, LogOut, User, Moon, Sun, ChevronsUpDown } from "lucide-react";
|
import { LogOut, User, Moon, Sun, ChevronsUpDown } from "lucide-react";
|
||||||
import { useTheme } from "next-themes";
|
import { useTheme } from "next-themes";
|
||||||
import ThemeButtons from "./ui/buttonTheme";
|
import ThemeButtons from "./ui/buttonTheme";
|
||||||
|
|
||||||
|
|
@ -27,32 +25,27 @@ export function UserNav() {
|
||||||
// In no-auth mode, show a simple theme switcher instead of auth UI
|
// In no-auth mode, show a simple theme switcher instead of auth UI
|
||||||
if (isNoAuthMode) {
|
if (isNoAuthMode) {
|
||||||
return (
|
return (
|
||||||
<Button
|
<button
|
||||||
onClick={() => setTheme(theme === "dark" ? "light" : "dark")}
|
onClick={() => setTheme(theme === "dark" ? "light" : "dark")}
|
||||||
variant="outline"
|
className="flex justify-center items-center gap-2 h-8 w-8 mr-2 rounded-md hover:bg-muted rounded-lg "
|
||||||
size="sm"
|
|
||||||
className="flex items-center gap-2"
|
|
||||||
>
|
>
|
||||||
{theme === "dark" ? (
|
{theme === "dark" ? (
|
||||||
<Sun className="h-4 w-4" />
|
<Sun size={16} className="text-muted-foreground" />
|
||||||
) : (
|
) : (
|
||||||
<Moon className="h-4 w-4" />
|
<Moon size={16} className="text-muted-foreground" />
|
||||||
)}
|
)}
|
||||||
</Button>
|
</button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isAuthenticated) {
|
if (!isAuthenticated) {
|
||||||
return (
|
return (
|
||||||
<Button
|
<button
|
||||||
onClick={login}
|
onClick={login}
|
||||||
variant="outline"
|
className="flex items-center gap-2 h-7 px-3 mr-2 rounded-md bg-primary text-primary-foreground text-sm"
|
||||||
size="sm"
|
|
||||||
className="flex items-center gap-2"
|
|
||||||
>
|
>
|
||||||
<LogIn className="h-4 w-4" />
|
|
||||||
Sign In
|
Sign In
|
||||||
</Button>
|
</button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue