Components

ProfileFriendsScreen

<ProfileFriendsScreen />

Constructor

# <ProfileFriendsScreen />

You can use this component to display the Profile Friends Screen in your custom screen.

Properties:
Name Type Attributes Description
userId Number <optional>

You can use this to display a specific user's profile friends by assigning their userId as this props's value

screenTitle String <optional>

List screen title

searchTerm String <optional>

If the user is not yet available in the app state, the component will attempt to load a list of users. You can use this field to search for the specific user you want to load instead of loading a list of users.

hideFilters Boolean <optional>

Use true to hide the filters in the screen

hideBackButton Boolean <optional>

Use true to hide the back button. By default, the button will use react-navigation's goBack() function. This can be changed using the setBackButtonRenderer hook.

hideNavigationHeader Boolean <optional>

Use true to hide the screen title container when scrolling

headerHeight Number <optional>

Define header height

LoadingComponent ReactComponent <optional>

Use this to display your own loading component while the screen is loading

Example
//In custom_code/components/MyCustomScreen.js...

import React from 'react';
import {View, Text} from "react-native";
import ProfileFriendsScreen from "@src/containers/Custom/Profile/ProfileFriendsScreen";

const MyCustomScreen = (props) => {

 if (!props.isFocused)
   return null;

 return (
   <>
       <View style={{marginTop: 40, paddingVertical: 30, alignItems: "center", backgroundColor: "gray"}}>
         <Text style={{color: "white"}}> Friends of Steve </Text>
       </View>
       <ProfileFriendsScreen
         userId={3}
         searchTerm="Steve"
         // screenTitle="Friends of Steve"
         hideBackButton={true}
         hideNavigationHeader={true}
         headerHeight={50}
         {...props}
       />
   </>
 )
}


export default MyCustomScreen;

//In custom_code/index.js...

...

import MyCustomScreen from "./components/MyCustomScreen";
export const applyCustomCode = externalCodeSetup => {
 externalCodeSetup.navigationApi.addNavigationRoute(
   "book",
   "BookScreen",
   MyCustomScreen,
   "All"
 );
 externalCodeSetup.navigationApi.addNavigationRoute(
   "book",
   "BookScreen",
   MyCustomScreen,
   "Main"
 );
}