diff options
author | Samuel Newman <mozzius@protonmail.com> | 2025-05-06 22:50:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-06 22:50:28 +0300 |
commit | 4c8fd006f6a994783a43e4744a3167db7aefc159 (patch) | |
tree | 0b8350774438cbbc2b8c6e77b844ce6b677381d3 /src/screens/Profile/Header/ProfileHeaderStandard.tsx | |
parent | 3f7dc9a8e5c9225ef20ce996543a1c3cfa991eb7 (diff) | |
download | voidsky-4c8fd006f6a994783a43e4744a3167db7aefc159.tar.zst |
New Edit Profile dialog on web, use new Edit Image dialog everywhere (#8220)
Diffstat (limited to 'src/screens/Profile/Header/ProfileHeaderStandard.tsx')
-rw-r--r-- | src/screens/Profile/Header/ProfileHeaderStandard.tsx | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/screens/Profile/Header/ProfileHeaderStandard.tsx b/src/screens/Profile/Header/ProfileHeaderStandard.tsx index 1c4c4d9f3..2dff101e6 100644 --- a/src/screens/Profile/Header/ProfileHeaderStandard.tsx +++ b/src/screens/Profile/Header/ProfileHeaderStandard.tsx @@ -12,10 +12,9 @@ import {useLingui} from '@lingui/react' import {sanitizeDisplayName} from '#/lib/strings/display-names' import {sanitizeHandle} from '#/lib/strings/handles' import {logger} from '#/logger' -import {isIOS, isWeb} from '#/platform/detection' +import {isIOS} from '#/platform/detection' import {useProfileShadow} from '#/state/cache/profile-shadow' import {type Shadow} from '#/state/cache/types' -import {useModalControls} from '#/state/modals' import { useProfileBlockMutationQueue, useProfileFollowMutationQueue, @@ -78,19 +77,7 @@ let ProfileHeaderStandard = ({ profile.viewer?.blockedBy || profile.viewer?.blockingByList - const {openModal} = useModalControls() const editProfileControl = useDialogControl() - const onPressEditProfile = React.useCallback(() => { - if (isWeb) { - // temp, while we figure out the nested dialog bug - openModal({ - name: 'edit-profile', - profile, - }) - } else { - editProfileControl.open() - } - }, [editProfileControl, openModal, profile]) const onPressFollow = () => { requireAuth(async () => { @@ -178,7 +165,7 @@ let ProfileHeaderStandard = ({ size="small" color="secondary" variant="solid" - onPress={onPressEditProfile} + onPress={editProfileControl.open} label={_(msg`Edit profile`)} style={[a.rounded_full]}> <ButtonText> |