diff --git a/packages/mobile/src/screens/profile-screen/DeactivatedProfileTombstone.tsx b/packages/mobile/src/screens/profile-screen/DeactivatedProfileTombstone.tsx index bb8bc3e9406..c7005903b57 100644 --- a/packages/mobile/src/screens/profile-screen/DeactivatedProfileTombstone.tsx +++ b/packages/mobile/src/screens/profile-screen/DeactivatedProfileTombstone.tsx @@ -2,13 +2,25 @@ import { useCallback } from 'react' import { route } from '@audius/common/utils' import { useLinkTo } from '@react-navigation/native' +import { ImageBackground } from 'react-native' -import { Button, Flex, IconArrowRight, Text } from '@audius/harmony-native' +import { + Avatar, + Button, + Flex, + IconArrowRight, + Text +} from '@audius/harmony-native' +import imageCoverPhotoBlank from 'app/assets/images/imageCoverPhotoBlank.jpg' +import imageProfilePicEmpty from 'app/assets/images/imageProfilePicEmpty2X.png' const { FEED_PAGE } = route +const COVER_PHOTO_HEIGHT = 96 + const messages = { helpText: 'This Account No Longer Exists', + description: 'The account you’re looking for has been deleted.', buttonText: 'Take Me Back To The Music' } @@ -20,18 +32,41 @@ export const DeactivatedProfileTombstone = () => { }, [linkTo]) return ( - - - {messages.helpText} - - + + + + {messages.helpText} + + + {messages.description} + + + + ) } diff --git a/packages/web/src/pages/profile-page/components/DeactivatedProfileTombstone.module.css b/packages/web/src/pages/profile-page/components/DeactivatedProfileTombstone.module.css deleted file mode 100644 index 3e1e0e6b656..00000000000 --- a/packages/web/src/pages/profile-page/components/DeactivatedProfileTombstone.module.css +++ /dev/null @@ -1,28 +0,0 @@ -.deactivated { - color: var(--harmony-neutral); - font-size: var(--harmony-font-m); - font-weight: var(--harmony-font-medium); - text-align: center; - - margin-top: 38px; - padding: 3px; - user-select: none; -} -.deactivated:not(.mobile) { - /** Offset to undo desktop left padding **/ - width: calc(100% + 229px); - margin-left: -229px; -} -.deactivatedText { - margin: 42px 0; - padding: 22px 0; -} - -.mobile.deactivated { - margin: 0; - padding: 24px 12px; - background-color: var(--harmony-white); -} -.mobile .deactivatedText { - margin: 24px 0 12px; -} diff --git a/packages/web/src/pages/profile-page/components/DeactivatedProfileTombstone.tsx b/packages/web/src/pages/profile-page/components/DeactivatedProfileTombstone.tsx index f07f16467ed..8e8228839f9 100644 --- a/packages/web/src/pages/profile-page/components/DeactivatedProfileTombstone.tsx +++ b/packages/web/src/pages/profile-page/components/DeactivatedProfileTombstone.tsx @@ -1,14 +1,12 @@ import { route } from '@audius/common/utils' -import { Button, IconArrowRight } from '@audius/harmony' -import cn from 'classnames' +import { Button, Flex, IconArrowRight, Text } from '@audius/harmony' import { Link } from 'react-router' -import styles from './DeactivatedProfileTombstone.module.css' - const { HOME_PAGE } = route const messages = { helpText: 'This Account No Longer Exists', + description: 'The account you’re looking for has been deleted.', buttonText: 'Take Me Back To The Music' } @@ -18,16 +16,46 @@ export const DeactivatedProfileTombstone = ({ isMobile?: boolean }) => { return ( -
-
{messages.helpText}
- -
+ + + {messages.helpText} + + + {messages.description} + + + + + ) } diff --git a/packages/web/src/pages/profile-page/components/desktop/ProfilePage.tsx b/packages/web/src/pages/profile-page/components/desktop/ProfilePage.tsx index 35d4317e55e..66a91b2c85f 100644 --- a/packages/web/src/pages/profile-page/components/desktop/ProfilePage.tsx +++ b/packages/web/src/pages/profile-page/components/desktop/ProfilePage.tsx @@ -450,8 +450,12 @@ const ProfilePage = ({ containerRef }: ProfilePageProps) => { fromOpacity={1} > + {/* `useCoverPhoto`/`useProfilePicture` already scrub deactivated + accounts' images and return the default placeholders, so pass the + real userId — withholding it leaves the hooks unresolved and the + images stuck on a loading skeleton. */} { > {/* @ts-ignore */} { - - - - {status === Status.SUCCESS && } - - + {status === Status.SUCCESS && } ) : ( diff --git a/packages/web/src/pages/profile-page/components/mobile/ProfileHeader.module.css b/packages/web/src/pages/profile-page/components/mobile/ProfileHeader.module.css index ec4fbcad3b8..b3d1bee8382 100644 --- a/packages/web/src/pages/profile-page/components/mobile/ProfileHeader.module.css +++ b/packages/web/src/pages/profile-page/components/mobile/ProfileHeader.module.css @@ -9,6 +9,16 @@ flex-direction: column; } +/** + * Deactivated profiles render no artist info below the cover photo, so the + * header must size to its content instead of growing into the space the + * tombstone claims — otherwise the two split the viewport and leave a blank + * band between the avatar and the message. + */ +.headerContainer.deactivated { + flex: none; +} + .coverPhoto { display: flex; flex-direction: column; diff --git a/packages/web/src/pages/profile-page/components/mobile/ProfileHeader.tsx b/packages/web/src/pages/profile-page/components/mobile/ProfileHeader.tsx index 945cbfa9c90..44391052c28 100644 --- a/packages/web/src/pages/profile-page/components/mobile/ProfileHeader.tsx +++ b/packages/web/src/pages/profile-page/components/mobile/ProfileHeader.tsx @@ -1,7 +1,10 @@ import { useState, useRef, useCallback, useEffect } from 'react' import { useArtistCreatedFanClub } from '@audius/common/api' -import { imageCoverPhotoBlank } from '@audius/common/assets' +import { + imageCoverPhotoBlank, + imageProfilePicEmpty +} from '@audius/common/assets' import { Name, SquareSizes, @@ -277,7 +280,11 @@ const ProfileHeader = ({ } return ( -
+
{messages.profilePicAltText} { } if (profile.is_deactivated) { - content = ( -
- -
- ) + // Rendered as a direct child of the page container (a flex column) so the + // tombstone's `flex: 1` can claim the space left below the header. + content = } else if (!isLoading && !isEditing) { content = (
@@ -463,7 +461,9 @@ const ProfilePage = ({ containerRef }: ProfilePageProps) => { structuredData={structuredData} entityType='user' hashId={profile?.user_id ? Id.parse(profile.user_id) : undefined} - containerClassName={styles.container} + containerClassName={cn(styles.container, { + [styles.deactivatedContainer]: profile.is_deactivated + })} >