Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/48736 fix settings header #48829

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/AccountSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function AccountSwitcher() {
<View style={[styles.flexRow, styles.gap3]}>
<Avatar
type={CONST.ICON_TYPE_AVATAR}
size={CONST.AVATAR_SIZE.MEDIUM}
size={CONST.AVATAR_SIZE.DEFAULT}
avatarID={currentUserPersonalDetails?.accountID}
source={currentUserPersonalDetails?.avatar}
fallbackIcon={currentUserPersonalDetails.fallbackIcon}
Expand Down
8 changes: 4 additions & 4 deletions src/components/AccountSwitcherSkeletonView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type AccountSwitcherSkeletonViewProps = {
avatarSize?: ValueOf<typeof CONST.AVATAR_SIZE>;
};

function AccountSwitcherSkeletonView({shouldAnimate = true, avatarSize = CONST.AVATAR_SIZE.LARGE}: AccountSwitcherSkeletonViewProps) {
function AccountSwitcherSkeletonView({shouldAnimate = true, avatarSize = CONST.AVATAR_SIZE.DEFAULT}: AccountSwitcherSkeletonViewProps) {
const theme = useTheme();
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
Expand All @@ -30,7 +30,7 @@ function AccountSwitcherSkeletonView({shouldAnimate = true, avatarSize = CONST.A
animate={shouldAnimate}
backgroundColor={theme.skeletonLHNIn}
foregroundColor={theme.skeletonLHNOut}
height={avatarPlaceholderSize + styles.pb3.paddingBottom}
height={avatarPlaceholderSize}
>
<Circle
cx={startPositionX}
Expand All @@ -39,13 +39,13 @@ function AccountSwitcherSkeletonView({shouldAnimate = true, avatarSize = CONST.A
/>
<Rect
x={startPositionX + avatarPlaceholderRadius + styles.gap3.gap}
y="11"
y="6"
width="45%"
height="8"
/>
<Rect
x={startPositionX + avatarPlaceholderRadius + styles.gap3.gap}
y="31"
y="26"
width="55%"
height="8"
/>
Expand Down
11 changes: 6 additions & 5 deletions src/pages/settings/InitialSettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,11 @@ function InitialSettingsPage({userWallet, bankAccountList, fundList, walletTerms
const workspaceMenuItems = useMemo(() => getMenuItemsSection(workspaceMenuItemsData), [workspaceMenuItemsData, getMenuItemsSection]);

const headerContent = (
<View style={[styles.ph5, styles.pb3]}>
<View style={[styles.ph5, styles.pv5]}>
{isEmptyObject(currentUserPersonalDetails) || currentUserPersonalDetails.displayName === undefined ? (
<AccountSwitcherSkeletonView avatarSize={CONST.AVATAR_SIZE.MEDIUM} />
<AccountSwitcherSkeletonView avatarSize={CONST.AVATAR_SIZE.DEFAULT} />
) : (
<View style={[styles.flexRow, styles.justifyContentBetween, styles.alignItemsCenter, styles.pb3, styles.gap3]}>
<View style={[styles.flexRow, styles.justifyContentBetween, styles.alignItemsCenter, styles.gap3]}>
<AccountSwitcher />
<Tooltip text={translate('statusPage.status')}>
<PressableWithFeedback
Expand Down Expand Up @@ -433,13 +433,14 @@ function InitialSettingsPage({userWallet, bankAccountList, fundList, walletTerms
includeSafeAreaPaddingBottom={false}
testID={InitialSettingsPage.displayName}
>
{headerContent}
<ScrollView
ref={scrollViewRef}
onScroll={onScroll}
scrollEventThrottle={16}
contentContainerStyle={[styles.w100, styles.pt4]}
contentContainerStyle={[styles.w100]}
showsVerticalScrollIndicator={false}
>
{headerContent}
{accountMenuItems}
{workspaceMenuItems}
{generalMenuItems}
Expand Down
Loading