chore(deps): drop next-themes; remove ThemeProvider + theme toggle UI
This commit is contained in:
@@ -19,11 +19,10 @@ import {
|
||||
import type { Route } from 'next'
|
||||
import type { LucideIcon } from 'lucide-react'
|
||||
import {
|
||||
LogOut, Menu, Moon, Settings, Sun, User, X,
|
||||
LogOut, Menu, Settings, User, X,
|
||||
ArrowRightLeft,
|
||||
ExternalLink as ExternalLinkIcon, HelpCircle, Mail,
|
||||
} from 'lucide-react'
|
||||
import { useTheme } from 'next-themes'
|
||||
import { Logo } from '@/components/shared/logo'
|
||||
import { NotificationBell } from '@/components/shared/notification-bell'
|
||||
import { useRoleSwitcher, RoleSwitcherPill } from './role-switcher'
|
||||
@@ -69,9 +68,6 @@ export function RoleNav({ navigation, roleName, user, basePath, statusBadge, edi
|
||||
})
|
||||
const endImpersonation = trpc.user.endImpersonation.useMutation()
|
||||
const logNavClick = trpc.learningResource.logNavClick.useMutation()
|
||||
const { theme, setTheme } = useTheme()
|
||||
const [mounted, setMounted] = useState(false)
|
||||
useEffect(() => setMounted(true), [])
|
||||
|
||||
const handleSignOut = async () => {
|
||||
if (isImpersonating) {
|
||||
@@ -172,20 +168,6 @@ export function RoleNav({ navigation, roleName, user, basePath, statusBadge, edi
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
)}
|
||||
{mounted && (
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={() => setTheme(theme === 'dark' ? 'light' : 'dark')}
|
||||
aria-label="Toggle theme"
|
||||
>
|
||||
{theme === 'dark' ? (
|
||||
<Sun className="h-5 w-5" />
|
||||
) : (
|
||||
<Moon className="h-5 w-5" />
|
||||
)}
|
||||
</Button>
|
||||
)}
|
||||
<RoleSwitcherPill currentBasePath={basePath} />
|
||||
<NotificationBell />
|
||||
<DropdownMenu>
|
||||
|
||||
Reference in New Issue
Block a user