feat/redesign header compact (#20922)

This commit is contained in:
Jacob Richman
2026-03-09 13:40:46 -07:00
committed by GitHub
parent 680077631d
commit e406dcc249
7 changed files with 180 additions and 6 deletions
@@ -5,7 +5,7 @@
*/
import type React from 'react';
import { useMemo, useEffect, useState } from 'react';
import { useMemo } from 'react';
import { Box, Text } from 'ink';
import { theme } from '../semantic-colors.js';
import {
@@ -20,13 +20,12 @@ interface UserIdentityProps {
export const UserIdentity: React.FC<UserIdentityProps> = ({ config }) => {
const authType = config.getContentGeneratorConfig()?.authType;
const [email, setEmail] = useState<string | undefined>();
useEffect(() => {
const email = useMemo(() => {
if (authType) {
const userAccountManager = new UserAccountManager();
setEmail(userAccountManager.getCachedGoogleAccount() ?? undefined);
return userAccountManager.getCachedGoogleAccount() ?? undefined;
}
return undefined;
}, [authType]);
const tierName = useMemo(