@@ -8,7 +8,6 @@ import React, {
8
8
} from 'react' ;
9
9
import { useTranslation } from 'react-i18next' ;
10
10
import { StyleSheet , View } from 'react-native' ;
11
- import { useAppDispatch , useAppSelector } from '../../hooks/redux' ;
12
11
13
12
import Dialog from '../../components/Dialog' ;
14
13
import Divider from '../../components/Divider' ;
@@ -19,8 +18,10 @@ import ProfileLinks from '../../components/ProfileLinks';
19
18
import SafeAreaInset from '../../components/SafeAreaInset' ;
20
19
import Button from '../../components/buttons/Button' ;
21
20
import { Keyboard } from '../../hooks/keyboard' ;
21
+ import { useAppDispatch , useAppSelector } from '../../hooks/redux' ;
22
22
import { useProfile , useSlashtags } from '../../hooks/slashtags' ;
23
23
import ProfileLinkNavigation from '../../navigation/bottom-sheet/ProfileLinkNavigation' ;
24
+ import { useSheetRef } from '../../navigation/bottom-sheet/SheetRefsProvider' ;
24
25
import type { RootStackScreenProps } from '../../navigation/types' ;
25
26
import { slashtagsLinksSelector } from '../../store/reselect/slashtags' ;
26
27
import { onboardingProfileStepSelector } from '../../store/reselect/slashtags' ;
@@ -29,7 +30,6 @@ import {
29
30
setOnboardingProfileStep ,
30
31
} from '../../store/slices/slashtags' ;
31
32
import { BasicProfile } from '../../store/types/slashtags' ;
32
- import { showBottomSheet } from '../../store/utils/ui' ;
33
33
import { ScrollView , View as ThemedView } from '../../styles/components' ;
34
34
import { PlusIcon } from '../../styles/icons' ;
35
35
import { BodyS } from '../../styles/text' ;
@@ -48,6 +48,7 @@ const ProfileEdit = ({
48
48
const [ showDeleteDialog , setShowDeleteDialog ] = useState ( false ) ;
49
49
const [ fields , setFields ] = useState < Omit < BasicProfile , 'links' > > ( { } ) ;
50
50
const dispatch = useAppDispatch ( ) ;
51
+ const sheetRef = useSheetRef ( 'profileAddDataForm' ) ;
51
52
const links = useAppSelector ( slashtagsLinksSelector ) ;
52
53
const onboardingStep = useAppSelector ( onboardingProfileStepSelector ) ;
53
54
@@ -94,7 +95,7 @@ const ProfileEdit = ({
94
95
95
96
const onAddLink = async ( ) : Promise < void > => {
96
97
await Keyboard . dismiss ( ) ;
97
- showBottomSheet ( 'profileAddDataForm' ) ;
98
+ sheetRef . current ?. present ( ) ;
98
99
} ;
99
100
100
101
const onSave = async ( ) : Promise < void > => {
0 commit comments