0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-27 21:39:16 -05:00

chore(console): cleanup unused code

This commit is contained in:
Charles Zhao 2022-08-12 13:56:15 +08:00
parent cb60b993cb
commit 212da8c9e4
No known key found for this signature in database
GPG key ID: 4858774754C92DF2

View file

@ -6,7 +6,6 @@ import { useTranslation } from 'react-i18next';
import Dropdown, { DropdownItem } from '@/components/Dropdown';
import { Ring as Spinner } from '@/components/Spinner';
import { generateAvatarPlaceHolderById } from '@/consts/avatars';
import useApi from '@/hooks/use-api';
import SignOut from '@/icons/SignOut';
import UserInfoSkeleton from '../UserInfoSkeleton';
@ -14,7 +13,6 @@ import * as styles from './index.module.scss';
const UserInfo = () => {
const { isAuthenticated, getIdTokenClaims, signOut } = useLogto();
const api = useApi();
const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' });
const anchorRef = useRef<HTMLDivElement>(null);
const [showDropdown, setShowDropdown] = useState(false);
@ -28,7 +26,7 @@ const UserInfo = () => {
setUser(userInfo ?? { sub: '', username: 'N/A' }); // Provide a fallback to avoid infinite loading state
}
})();
}, [api, isAuthenticated, getIdTokenClaims]);
}, [isAuthenticated, getIdTokenClaims]);
if (!user) {
return <UserInfoSkeleton />;