/* * Copyright (c) 2021 - 2024, Ludvig Lundgren and the autobrr contributors. * SPDX-License-Identifier: GPL-2.0-or-later */ import { Fragment } from "react"; import { UserIcon } from "@heroicons/react/24/solid"; import { Menu, MenuButton, MenuItem, MenuItems, Transition } from "@headlessui/react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faOpenid } from "@fortawesome/free-brands-svg-icons"; import { classNames } from "@utils"; import { RightNavProps } from "./_shared"; import { Cog6ToothIcon, ArrowLeftOnRectangleIcon, MoonIcon, SunIcon } from "@heroicons/react/24/outline"; import { Link } from "@tanstack/react-router"; import { AuthContext, SettingsContext } from "@utils/Context"; export const RightNav = (props: RightNavProps) => { const [settings, setSettings] = SettingsContext.use(); const auth = AuthContext.get(); const toggleTheme = () => { setSettings(prevState => ({ ...prevState, darkTheme: !prevState.darkTheme })); }; return (