'use client' import { useTranslation } from 'react-i18next' import { Fragment } from 'react' import { useRouter } from 'next/navigation' import { Menu, Transition } from '@headlessui/react' import Avatar from '@/app/components/base/avatar' import { logout } from '@/service/common' import { useAppContext } from '@/context/app-context' import { LogOut01 } from '@/app/components/base/icons/src/vender/line/general' export type IAppSelector = { isMobile: boolean } export default function AppSelector() { const router = useRouter() const { t } = useTranslation() const { userProfile } = useAppContext() const handleLogout = async () => { await logout({ url: '/logout', params: {}, }) localStorage.removeItem('setup_status') localStorage.removeItem('console_token') localStorage.removeItem('refresh_token') router.push('/signin') } return (
) }