Skip to content

Commit 2b2f3d5

Browse files
Fix signup default avatar artifact (#14480)
## Summary - Use the newer empty profile image for the signup account header fallback. - Remove the centered decorative camera button from the empty signup avatar so the default image renders cleanly without the square-looking artifact. - Rebase onto current main and fix the web-player import ordering lint failure surfaced by CI. ## Testing - `git diff --check` - `NODE_PATH=/Users/ray/Documents/audius/apps/node_modules /usr/local/bin/node /Users/ray/Documents/audius/apps/node_modules/prettier/bin/prettier.cjs --check packages/web/src/pages/sign-up-page/components/AccountHeader.tsx packages/web/src/app/web-player/WebPlayer.tsx` - CI: Web Lint & Stylelint passed - CI: Web Tests passed - CI: Web Typecheck passed - CI: Web Build passed Note: package-local scripts still are not runnable from this worktree because it has no local `node_modules`, `npm`, or `corepack`.
1 parent 0f000be commit 2b2f3d5

2 files changed

Lines changed: 5 additions & 16 deletions

File tree

packages/web/src/app/web-player/WebPlayer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ import { NotificationPage } from 'components/notification'
6666
import PlayBarProvider from 'components/play-bar/PlayBarProvider'
6767
import { RewardClaimedToast } from 'components/reward-claimed-toast/RewardClaimedToast'
6868
import { USDCBalanceFetcher } from 'components/usdc-balance-fetcher/USDCBalanceFetcher'
69-
import { useEnvironment } from 'hooks/useEnvironment'
7069
import { useActivityPing } from 'hooks/useActivityPing'
70+
import { useEnvironment } from 'hooks/useEnvironment'
7171
import { usePlaybackPositionPersistence } from 'hooks/usePlaybackPositionPersistence'
7272
import { usePlaybackPositionPolling } from 'hooks/usePlaybackPositionPolling'
7373
import { usePlaybackRatePersistence } from 'hooks/usePlaybackRatePersistence'

packages/web/src/pages/sign-up-page/components/AccountHeader.tsx

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import { useCurrentAccountUser } from '@audius/common/api'
2-
import { imageProfilePicEmpty } from '@audius/common/assets'
2+
import { imageProfilePicEmptyNew as imageProfilePicEmpty } from '@audius/common/assets'
33
import { Name, SquareSizes } from '@audius/common/models'
44
import {
55
Avatar,
66
Box,
77
Flex,
88
IconArrowLeft,
9-
IconButton,
10-
IconCamera,
119
IconVerified,
1210
PlainButton,
1311
Text,
@@ -64,17 +62,7 @@ const ProfileImageAvatar = ({
6462
...(isSmallSize ? { transform: 'translateY(20px)' } : null)
6563
}}
6664
isLoading={false}
67-
>
68-
{isEditing && (!imageUrl || imageUrl === imageProfilePicEmpty) ? (
69-
<IconButton
70-
aria-label='Upload a profile photo'
71-
size='l'
72-
color='white'
73-
shadow='drop'
74-
icon={IconCamera}
75-
/>
76-
) : null}
77-
</Avatar>
65+
/>
7866
)
7967
}
8068

@@ -104,7 +92,8 @@ export const AccountHeader = (props: AccountHeaderProps) => {
10492
const { accountHandle, userId, accountDisplayName } = accountData ?? {}
10593
const accountProfilePic = useProfilePicture({
10694
userId: userId ?? undefined,
107-
size: SquareSizes.SIZE_150_BY_150
95+
size: SquareSizes.SIZE_150_BY_150,
96+
defaultImage: imageProfilePicEmpty
10897
})
10998

11099
const isEditing = mode === 'editing'

0 commit comments

Comments
 (0)