export function BluetoothPage()

in src/bluetooth/Bluetooth.tsx [33:73]


export function BluetoothPage() {
  const {colors} = useTheme();

  return (
    <BluetoothStack.Navigator
      initialRouteName={Pages.BLUETOOTH_LIST}
      screenOptions={({navigation, route}) => {
        const isListPage: boolean = route.name === Pages.BLUETOOTH_LIST;

        return {
          headerTitle: () => (
            <Text
              style={{
                ...appStyles.logoText,
                color: colors.text,
              }}>
              {isListPage ? Strings.Title : route.params?.deviceName ?? ''}
            </Text>
          ),
          headerTitleAlign: 'left',
          headerLeft: isListPage ? () => <Logo /> : undefined,
          headerBackTitleVisible: false,
          headerRight: () => (
            <View style={appStyles.headerButtons}>
              {isListPage && <ReloadButton />}
              <Profile navigate={navigation.navigate} />
            </View>
          ),
        };
      }}>
      <BluetoothStack.Screen
        name={Pages.BLUETOOTH_LIST}
        component={BluetoothList}
      />
      <BluetoothStack.Screen
        name={Pages.BLUETOOTH_DETAIL}
        component={BluetoothDetail}
      />
    </BluetoothStack.Navigator>
  );
}