@@ -2,10 +2,8 @@ import React, { useMemo, useRef } from 'react';
22import { Platform , StyleSheet , Text , View } from 'react-native' ;
33import { ScrollView } from 'react-native-gesture-handler' ;
44import { useLocalSearchParams , useRouter } from 'expo-router' ;
5- import {
6- BottomSheetModal ,
7- BottomSheetModalProvider ,
8- } from '@gorhom/bottom-sheet' ;
5+ import { BottomSheetProvider } from '@swmansion/react-native-bottom-sheet' ;
6+ import type { AppBottomSheetRef } from '../../../components/bottomSheets/AppBottomSheet' ;
97import { useTheme } from '../../../context/ThemeContext' ;
108import { Theme } from '../../../styles/colors' ;
119import { fontFamily , fontSizes } from '../../../styles/fontStyles' ;
@@ -15,7 +13,7 @@ import { getModelFamily } from '../../../utils/modelFamily';
1513import ModelCard from '../../../components/model-hub/ModelCard' ;
1614import ModelManagementSheet from '../../../components/bottomSheets/ModelManagementSheet' ;
1715import WarningSheet , {
18- WarningSheetData ,
16+ type WarningSheetData ,
1917} from '../../../components/bottomSheets/WarningSheet' ;
2018import ModalHeader from '../../../components/ModalHeader' ;
2119import { FAMILY_DESCRIPTIONS } from '../../../constants/family-descriptions' ;
@@ -29,10 +27,9 @@ const FamilyScreen = () => {
2927
3028 const { models } = useModelStore ( ) ;
3129
32- const modelManagementSheetRef = useRef < BottomSheetModal | null > ( null ) ;
33- const wifiWarningSheetRef = useRef < BottomSheetModal < WarningSheetData > | null > (
34- null
35- ) ;
30+ const modelManagementSheetRef = useRef < AppBottomSheetRef < Model > | null > ( null ) ;
31+ const wifiWarningSheetRef =
32+ useRef < AppBottomSheetRef < WarningSheetData > | null > ( null ) ;
3633
3734 const familyModels = useMemo (
3835 ( ) =>
@@ -45,7 +42,7 @@ const FamilyScreen = () => {
4542 const description = FAMILY_DESCRIPTIONS [ familyName ] ;
4643
4744 return (
48- < BottomSheetModalProvider >
45+ < BottomSheetProvider >
4946 < View style = { styles . container } >
5047 < View style = { styles . content } >
5148 < ModalHeader
@@ -85,7 +82,7 @@ const FamilyScreen = () => {
8582 < ModelManagementSheet bottomSheetModalRef = { modelManagementSheetRef } />
8683 < WarningSheet bottomSheetModalRef = { wifiWarningSheetRef } />
8784 </ View >
88- </ BottomSheetModalProvider >
85+ </ BottomSheetProvider >
8986 ) ;
9087} ;
9188
0 commit comments