diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-10-29 20:55:30 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-29 20:55:30 +0000 |
commit | 1cfcffd79eb8298e628c9bb9b71570e1b1269c6a (patch) | |
tree | a7aadf22c70aafcfb6b9e74df95807b122aa1cfb /src/screens/Profile/Header/ProfileHeaderLabeler.tsx | |
parent | 27ff85433b7ce0f1a9d3a2e20e8ef9179a11f9ff (diff) | |
download | voidsky-1cfcffd79eb8298e628c9bb9b71570e1b1269c6a.tar.zst |
temp revert to old modal (#6005)
Diffstat (limited to 'src/screens/Profile/Header/ProfileHeaderLabeler.tsx')
-rw-r--r-- | src/screens/Profile/Header/ProfileHeaderLabeler.tsx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/screens/Profile/Header/ProfileHeaderLabeler.tsx b/src/screens/Profile/Header/ProfileHeaderLabeler.tsx index 37a5985cf..ca0cb1e62 100644 --- a/src/screens/Profile/Header/ProfileHeaderLabeler.tsx +++ b/src/screens/Profile/Header/ProfileHeaderLabeler.tsx @@ -15,9 +15,10 @@ import {MAX_LABELERS} from '#/lib/constants' import {useHaptics} from '#/lib/haptics' import {isAppLabeler} from '#/lib/moderation' import {logger} from '#/logger' -import {isIOS} from '#/platform/detection' +import {isIOS, isWeb} from '#/platform/detection' import {useProfileShadow} from '#/state/cache/profile-shadow' import {Shadow} from '#/state/cache/types' +import {useModalControls} from '#/state/modals' import {useLabelerSubscriptionMutation} from '#/state/queries/labeler' import {useLikeMutation, useUnlikeMutation} from '#/state/queries/like' import {usePreferencesQuery} from '#/state/queries/preferences' @@ -116,10 +117,19 @@ let ProfileHeaderLabeler = ({ } }, [labeler, playHaptic, likeUri, unlikeMod, likeMod, _]) + const {openModal} = useModalControls() const editProfileControl = useDialogControl() const onPressEditProfile = React.useCallback(() => { - editProfileControl.open() - }, [editProfileControl]) + if (isWeb) { + // temp, while we figure out the nested dialog bug + openModal({ + name: 'edit-profile', + profile, + }) + } else { + editProfileControl.open() + } + }, [editProfileControl, openModal, profile]) const onPressSubscribe = React.useCallback( () => |